public void SetMode(InspectorMode mode) { if (this.inspectorMode == mode) { return; } SkillEditor.DoDirtyFsmPrefab(); EditorPrefs.SetInt(EditorPrefStrings.get_InspectorMode(), (int)mode); Keyboard.ResetFocus(); this.inspectorMode = mode; this.ResetView(); InspectorMode inspectorMode = this.inspectorMode; if (inspectorMode != InspectorMode.FsmInspector) { if (inspectorMode == InspectorMode.Watermarks) { WatermarkSelector.Init(); } } else { FsmInspector.Init(); } SkillEditor.Repaint(true); }
public static void ResetSelection() { if (WatermarkSelector.watermarkThumbs == null) { WatermarkSelector.Init(); } if (WatermarkSelector.watermarkThumbs == null) { Debug.LogError(Strings.get_Error_Could_not_load_watermarks()); return; } Texture texture = Watermarks.Get(SkillEditor.SelectedFsm); WatermarkSelector.selectedWatermarkIndex = -1; for (int i = 0; i < WatermarkSelector.watermarkThumbs.Length; i++) { if (texture == WatermarkSelector.watermarkThumbs[i].get_image()) { WatermarkSelector.selectedWatermarkIndex = i; } } }