private void DrawDeveloperMode() { _showDeveloperMode = EditorGUILayout.Foldout(_showDeveloperMode, "Developer Mode"); if (_showDeveloperMode) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (GUILayout.Button("Create Wrapper")) { ObjectsBuilderWindow.BuildOnlyWrapper((VarwinObjectDescriptor)target); } if (GUILayout.Button("Create Icon")) { ObjectsBuilderWindow.BuildOnlyIcon((VarwinObjectDescriptor)target); } if (GUILayout.Button("Create Config")) { ObjectsBuilderWindow.BuildOnlyConfigs((VarwinObjectDescriptor)target); } if (GUILayout.Button("Build Asset Bundle")) { ObjectsBuilderWindow.BuildOnlyBundle((VarwinObjectDescriptor)target); } if (GUILayout.Button("Zip And Show")) { ObjectsBuilderWindow.BuildOnlyZip((VarwinObjectDescriptor)target); } EditorGUILayout.EndVertical(); } }
private void OnObjectBuilt(System.Object sender, EventArgs eventArgs) { var varwinObject = (VarwinObjectDescriptor)target; ObjectsBuilderWindow window = GetWindow(); if (window != null) { window.ObjectBuilt -= OnObjectBuilt; } CreateObjectUtils.RevertPrefabInstanceChanges(varwinObject.gameObject); }
public void BuildVarwinObject(VarwinObjectDescriptor varwinObjectDescriptor) { varwinObjectDescriptor.PreBuild(); CreateObjectUtils.ApplyPrefabInstanceChanges(varwinObjectDescriptor.gameObject); VarwinObjectDescriptor varwinPrefab = CreateObjectUtils.GetPrefab(varwinObjectDescriptor.gameObject).GetComponent <VarwinObjectDescriptor>(); ObjectsBuilderWindow.BuildVarwinObject(varwinObjectDescriptor); ObjectsBuilderWindow window = GetWindow(); if (window != null) { window.ObjectBuilt += OnObjectBuilt; } }