Esempio n. 1
0
        IEnumerator CreateScriptableObjectMasterCharacterRun()
        {
            var areaAsset = ScriptableObject.CreateInstance <App.Model.Scriptable.CharacterAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("character")));

            areaAsset.characters = sMaster.responseAll.characters;

            UnityEditor.AssetDatabase.CreateAsset(areaAsset, string.Format(scriptableObjectPath, App.Model.Scriptable.CharacterAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }
Esempio n. 2
0
        IEnumerator CreateScriptableObjectMasterBattleFieldRun()
        {
            var asset = ScriptableObject.CreateInstance <App.Model.Scriptable.BattlefieldAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("battlefield")));

            asset.battlefields = sMaster.responseAll.battlefields;

            UnityEditor.AssetDatabase.CreateAsset(asset, string.Format(scriptableObjectPath, App.Model.Scriptable.BattlefieldAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }
Esempio n. 3
0
        IEnumerator CreateScriptableObjectMasterWeaponRun()
        {
            var asset = ScriptableObject.CreateInstance <App.Model.Scriptable.WeaponAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("weapon")));

            asset.equipments = sMaster.responseAll.weapons;

            UnityEditor.AssetDatabase.CreateAsset(asset, string.Format(scriptableObjectPath, App.Model.Scriptable.WeaponAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }