Browse Source

Fix + Scene

Marcel Zickler 3 years ago
parent
commit
a3d322c9a3

+ 0 - 1
.idea/.idea.VR Cycling/.idea/indexLayout.xml

@@ -33,7 +33,6 @@
       <Path>Integrations</Path>
       <Path>Library</Path>
       <Path>Logs</Path>
-      <Path>Temp</Path>
       <Path>UserSettings</Path>
       <Path>obj</Path>
     </explicitExcludes>

+ 6 - 2
Assets/Editor/RouteDrawer.cs

@@ -10,7 +10,7 @@ public static class RouteDrawer
 
     private static bool showListContent = true;
 
-    public static void PropertyField(SerializedProperty route)
+    public static void PropertyField(SerializedProperty route) //TODO: onDelete
     {
         Debug.Log("route = "+route);
         ListField(route.FindPropertyRelative("items"));
@@ -18,8 +18,12 @@ public static class RouteDrawer
 
     private static void ListField(SerializedProperty list)
     {
-        //EditorGUILayout.BeginHorizontal();
+        EditorGUILayout.BeginHorizontal();
         showListContent = EditorGUILayout.Foldout(showListContent, $"{list.displayName} (Length = {0/*list.arraySize*/})");
+        if (GUILayout.Button("-", EditorStyles.miniButton, GUILayout.Width(32)))
+        {
+            //list.DeleteArrayElementAtIndex(i); TODO: onDelete
+        }
         EditorGUILayout.EndHorizontal();
         //EditorGUILayout.PropertyField(list.displayName);
         if (showListContent) {

+ 0 - 6
Assets/Editor/RoutesEditor.cs

@@ -27,13 +27,7 @@ public class RoutesEditor : Editor
             EditorGUI.indentLevel += 1;
             EditorGUILayout.PropertyField(list.FindPropertyRelative("Array.size"));
             for (var i = 0; i < list.arraySize; i++) {
-                EditorGUILayout.BeginHorizontal();
                 RouteDrawer.PropertyField(list.GetArrayElementAtIndex(i));
-                if (GUILayout.Button("-", EditorStyles.miniButton, GUILayout.Width(32)))
-                {
-                    list.DeleteArrayElementAtIndex(i);
-                }
-                //EditorGUILayout.EndHorizontal();
             }
             EditorGUI.indentLevel -= 1;
         }

+ 56 - 4
Assets/Scenes/MainScene.unity

@@ -78847,6 +78847,61 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 322707610}
   m_PrefabAsset: {fileID: 0}
+--- !u!1 &322775076
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 322775078}
+  - component: {fileID: 322775077}
+  m_Layer: 0
+  m_Name: Routes
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!114 &322775077
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 322775076}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: c94f7db623b74907b04373ef43f61f45, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  routes:
+  - items:
+    - turn: {fileID: 0}
+      from: 0
+      to: 0
+    - turn: {fileID: 0}
+      from: 0
+      to: 0
+  - items: []
+  - items: []
+  - items: []
+  selectedRoute: -1
+--- !u!4 &322775078
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 322775076}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 46.355457, y: 14.633936, z: 22.676895}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 6
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1001 &323249490
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -277198,7 +277253,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!114 &1169776437
 MonoBehaviour:
@@ -530440,9 +530495,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: b2243e4869d84bebb8546c26e68f7c63, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  initialSize: 10
-  amountIncrease: 5
-  prefab: {fileID: 0}
 --- !u!1001 &6606720722099106110
 PrefabInstance:
   m_ObjectHideFlags: 0