public override void OnDrawGizmos(CerealBehaviour source, SerializedProperty property, GUIContent label) { switch (property.propertyType) { case SerializedPropertyType.Vector3: Gizmos.color = Color.blue; Gizmos.DrawSphere(property.vector3Value, .5f); break; default: throw new System.ArgumentException(string.Format("The visualization behavior of Type {0} is not implemented", property.propertyType)); break; } }
public override void OnSceneGUI(CerealBehaviour source, SerializedProperty property, GUIContent label) { switch (property.propertyType) { case SerializedPropertyType.Vector3: property.vector3Value = Handles.PositionHandle(property.vector3Value, Quaternion.identity); property.serializedObject.ApplyModifiedProperties(); Handles.Label(property.vector3Value, label); break; default: throw new System.ArgumentException(string.Format("The visualization behavior of Type {0} is not implemented", property.propertyType)); break; } }
public override void OnSceneGUI(CerealBehaviour source, UnityEditor.SerializedProperty property, GUIContent label) { base.OnSceneGUI(source, property, label); }