public void Generate() { //If this object is not an asset AssetUtil.CreateAsset(RootFolder, this); //Create the Runtime Resources folder if it doesn't already exist AssetUtil.CreateFolder(RuntimeResources); if (RuntimeData == null && !EditorApplication.isPlayingOrWillChangePlaymode) { _runtimeData = CreateInstance <CharacterData>(); _runtimeData.name = InternalName + RuntimeDataSuffix; AssetUtil.CreateAsset(RuntimeResources, _runtimeData); } }