private void SetTemplateData(System.Enum _incEnum)
        {
            if (_incEnum.GetType() == typeof(E_NewCombatStateTemplate))
            {
                E_NewCombatStateTemplate template = (E_NewCombatStateTemplate)_incEnum;
                m_copiedStateCache?.Cleanup();
                m_copiedStateCache = new StateDataCache();

                OTGEditorUtility.PopulateStateByTemplate(template, ref m_copiedStateCache, m_editorConfig);
                ContainerElement.Q <TextField>("new-state-name-textfield").value = template.ToString() + "template selected";
            }
        }
Пример #2
0
        private static void CreateTwitchFighterStateTemplate(E_NewCombatStateTemplate _template, ref StateDataCache _cache, EditorConfig _config)
        {
            SerializedObject obj = new SerializedObject(AssetDatabase.LoadAssetAtPath <OTGCombatState>(_config.TemplatesPaths + "/" + _template.ToString() + ".asset"));

            _cache.CreateTemplate(obj);
        }