private void CreateCharacter() { DCharacter chara = (DCharacter)ScriptableObject.CreateInstance <DCharacter>(); chara.SetIdentificator(assetName); chara.name = assetName; var container = (Container)AssetDatabase.LoadAssetAtPath("Assets/Paradox Engine/Database/Data/Characters.asset", typeof(Container)); container.data.Add(chara); AssetDatabase.AddObjectToAsset(chara, container); EditorUtility.SetDirty(container); EditorUtility.SetDirty(chara); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); VNDatabaseWindow.AsignElem(chara); }
private void CreateBackground() { DLocation back = (DLocation)ScriptableObject.CreateInstance <DLocation>(); back.SetIdentificator(assetName); back.name = assetName; var container = (Container)AssetDatabase.LoadAssetAtPath("Assets/Paradox Engine/Database/Data/Locations.asset", typeof(Container)); container.data.Add(back); AssetDatabase.AddObjectToAsset(back, container); EditorUtility.SetDirty(container); EditorUtility.SetDirty(back); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); VNDatabaseWindow.AsignElem(back); }
private void CreateSoundtrack() { DSoundtrack sound = (DSoundtrack)ScriptableObject.CreateInstance <DSoundtrack>(); sound.SetIdentificator(assetName); sound.name = assetName; var container = (Container)AssetDatabase.LoadAssetAtPath("Assets/Paradox Engine/Database/Data/Soundtracks.asset", typeof(Container)); container.data.Add(sound); AssetDatabase.AddObjectToAsset(sound, container); EditorUtility.SetDirty(container); EditorUtility.SetDirty(sound); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); VNDatabaseWindow.AsignElem(sound); }