//---------------------------------------------------------------------------- private static bool ProcessAssetCreationData(PKFxManagerImpl.SAssetChangesDesc assetChange) { PKFxFxAsset fxAsset = ScriptableObject.CreateInstance <PKFxFxAsset>(); if (fxAsset != null) { fxAsset.m_Data = File.ReadAllBytes("Temp/PopcornFx/Baked/" + assetChange.m_Path); fxAsset.m_AssetName = assetChange.m_Path; if (ProcessAssetChangeData(fxAsset, assetChange.m_Path) == false) { return(false); } CreateAssetFolderUpToPath(assetChange.m_Path); AssetDatabase.CreateAsset(fxAsset, Path.Combine("Assets" + PKFxSettings.UnityPackFxPath, assetChange.m_Path + ".asset")); } return(true); }
//---------------------------------------------------------------------------- // Public Methods //---------------------------------------------------------------------------- public static bool CreatePKFXAsset(PKFxManagerImpl.SAssetChangesDesc assetChange) { return(ProcessAssetCreationData(assetChange)); }