private void ShowActionTypeGUI() { if (selectedClass == null || string.IsNullOrEmpty(selectedClass.fileName)) { return; } EditorGUILayout.BeginVertical(CustomStyles.thinBox); showActionType = CustomGUILayout.ToggleHeader(showActionType, selectedClass.GetFullTitle()); if (showActionType) { SpeechLine.ShowField("Name:", selectedClass.GetFullTitle(), false); SpeechLine.ShowField("Filename:", selectedClass.fileName + ".cs", false); SpeechLine.ShowField("Description:", selectedClass.description, true); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Node colour:", GUILayout.Width(85f)); selectedClass.color = EditorGUILayout.ColorField(selectedClass.color); EditorGUILayout.EndHorizontal(); if (!string.IsNullOrEmpty(defaultClassName) && selectedClass.fileName == defaultClassName) { EditorGUILayout.HelpBox("This is marked as the default Action", MessageType.Info); } else { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Is enabled?", GUILayout.Width(85f)); selectedClass.isEnabled = EditorGUILayout.Toggle(selectedClass.isEnabled); EditorGUILayout.EndHorizontal(); } } CustomGUILayout.EndVertical(); }
private void SearchForInstances(bool justLocal, ActionType actionType) { bool foundInstance = false; if (justLocal) { foundInstance = SearchSceneForType(string.Empty, actionType); } else { // First look for lines that already have an assigned lineID string[] sceneFiles = AdvGame.GetSceneFiles(); if (sceneFiles == null || sceneFiles.Length == 0) { Debug.LogWarning("Cannot search scenes - no enabled scenes could be found in the Build Settings."); } else { foreach (string sceneFile in sceneFiles) { bool foundSceneInstance = SearchSceneForType(sceneFile, actionType); if (foundSceneInstance) { foundInstance = true; } } } ActionListAsset[] allActionListAssets = AdvGame.GetReferences().speechManager.GetAllActionListAssets(); foreach (ActionListAsset actionListAsset in allActionListAssets) { int[] foundIDs = SearchActionsForType(actionListAsset.actions, actionType); if (foundIDs != null && foundIDs.Length > 0) { ACDebug.Log("(Asset: " + actionListAsset.name + ") Found " + foundIDs.Length + " instances of '" + actionType.GetFullTitle() + "' " + CreateIDReport(foundIDs), actionListAsset); foundInstance = true; } } } if (!foundInstance) { ACDebug.Log("No instances of '" + actionType.GetFullTitle() + "' were found."); } }
private void SearchAssetForType(ActionListAsset actionListAsset, ActionType actionType) { if (actionListAsset == null) { return; } if (searchedAssets.Contains(actionListAsset)) { return; } searchedAssets.Add(actionListAsset); if (actionListAsset != null) { int[] foundIDs = SearchActionsForType(actionListAsset.actions, actionType); if (foundIDs != null && foundIDs.Length > 0) { ACDebug.Log("(Asset: " + actionListAsset.name + ") Found " + foundIDs.Length + " instances of '" + actionType.GetFullTitle() + "' " + CreateIDReport(foundIDs), actionListAsset); } } }
private void SearchAssetForType(ActionListAsset actionListAsset, ActionType actionType) { if (searchedAssets.Contains(actionListAsset)) { return; } searchedAssets.Add(actionListAsset); if (actionListAsset != null) { int numFinds = SearchActionsForType(actionListAsset.actions, actionType); if (numFinds > 0) { ACDebug.Log("(Asset: " + actionListAsset.name + ") Found " + numFinds + " instances of '" + actionType.GetFullTitle() + "'"); } } }
private void SearchAssetForType(ActionListAsset actionListAsset, ActionType actionType) { if (searchedAssets.Contains (actionListAsset)) { return; } searchedAssets.Add (actionListAsset); if (actionListAsset != null) { int numFinds = SearchActionsForType (actionListAsset.actions, actionType); if (numFinds > 0) { ACDebug.Log ("(Asset: " + actionListAsset.name + ") Found " + numFinds + " instances of '" + actionType.GetFullTitle () + "'"); } } }