Beispiel #1
0
 /// <summary>
 /// Updates all prototypes in Assets/.
 /// </summary>
 public static void UpdateAllPrototypes()
 {
     foreach (string assetGUID in AssetDatabase.FindAssets("t:Prototype"))
     {
         SerializedPrototypeEditor serializedPrototypeEditor = new SerializedPrototypeEditor(new SerializedObject(AssetDatabase.LoadAssetAtPath <PrototypeObject>(AssetDatabase.GUIDToAssetPath(assetGUID))));
         serializedPrototypeEditor.UpdatePrototypeHierachy();
         serializedPrototypeEditor.serializedObject.ApplyModifiedProperties();
     }
 }
Beispiel #2
0
 void OnEnable()
 {
     serializedPrototypeObject = new SerializedPrototypeEditor(serializedObject);
     serializedPrototypeObject.UpdatePrototypeHierachy();
 }