gizmos properties to isoworld

This commit is contained in:
2016-12-15 01:12:05 +07:00
parent b79a1adcd4
commit 2ff0b86135
4 changed files with 438 additions and 51 deletions

View File

@@ -57,6 +57,19 @@ namespace IsoTools.Internal {
}
}
void DrawWorldEditorProperties() {
var iso_world = IsoWorld.Instance;
if ( iso_world ) {
var so = new SerializedObject(iso_world);
EditorGUILayout.PropertyField(so.FindProperty("_showIsoBounds"));
EditorGUILayout.PropertyField(so.FindProperty("_showScreenBounds"));
EditorGUILayout.PropertyField(so.FindProperty("_showDepends"));
if ( GUI.changed ) {
so.ApplyModifiedProperties();
}
}
}
static bool SnappingProcess(ref float min_a, float size_a, float min_b, float size_b) {
var max_a = min_a + size_a;
var max_b = min_b + size_b;
@@ -331,6 +344,7 @@ namespace IsoTools.Internal {
DrawDefaultInspector();
GrabPositions();
DirtyTargetPosition();
DrawWorldEditorProperties();
}
}
}