ObjectPlacementData.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #if UNITY_EDITOR
  2. using UnityEngine;
  3. namespace O3DWB
  4. {
  5. public class ObjectPlacementData
  6. {
  7. #region Private Variables
  8. private Vector3 _worldPosition;
  9. private Vector3 _worldScale;
  10. private Quaternion _worldRotation;
  11. private Prefab _prefab;
  12. #endregion
  13. #region Public Properties
  14. public Vector3 WorldPosition { get { return _worldPosition; } set { _worldPosition = value; } }
  15. public Vector3 WorldScale { get { return _worldScale; } set { _worldScale = value; } }
  16. public Quaternion WorldRotation { get { return _worldRotation; } set { _worldRotation = value; } }
  17. public Prefab Prefab { get { return _prefab; } set {_prefab = value; } }
  18. #endregion
  19. #region Public Constructors
  20. public ObjectPlacementData()
  21. {
  22. }
  23. public ObjectPlacementData(TransformMatrix transformMatrix, Prefab prefab)
  24. {
  25. _worldPosition = transformMatrix.Translation;
  26. _worldRotation = transformMatrix.Rotation;
  27. _worldScale = transformMatrix.Scale;
  28. _prefab = prefab;
  29. }
  30. #endregion
  31. }
  32. }
  33. #endif