public override void DrawCommandGUI() { if (flowchart == null) { return; } serializedObject.Update(); EditorGUILayout.PropertyField(csvCommandKeyProp); EditorGUILayout.PropertyField(textProp); EditorGUILayout.PropertyField(descriptionProp); BlockEditor.BlockField(targetBlockProp, new GUIContent("Target Block", "Block to call when option is selected"), new GUIContent("<None>"), flowchart); EditorGUILayout.PropertyField(hideIfVisitedProp); EditorGUILayout.PropertyField(interactableProp); EditorGUILayout.PropertyField(setMenuDialogProp); EditorGUILayout.PropertyField(hideThisOptionProp); MenuExtend t = target as MenuExtend; EditorGUILayout.PropertyField(HasConditionProp); if (t.HasCondition == true) { EditorGUILayout.PropertyField(requireValueProp, new GUIContent("Require Gold")); } serializedObject.ApplyModifiedProperties(); }
protected virtual void CatchLocalizeText() { //Catch Localize Data when focus if (flowchart == null) { return; } MenuExtend t = target as MenuExtend; string textTerm = $"{flowchart.GoogleSheetID}.{flowchart.GooglePageID}.{csvCommandKeyProp.stringValue}"; string localText = FungusExt.LocalizeManager.GetLocalizeText(textTerm); if (string.IsNullOrEmpty(localText)) { string blockName = AdvUtility.FindParentBlock(flowchart, t).BlockName; Debug.LogError($"At : {t.gameObject.name} / {blockName} / {t.ItemId}"); } textProp.stringValue = string.IsNullOrEmpty(localText) ? $"(key not found : {textTerm})" : localText; serializedObject.ApplyModifiedProperties(); }