Changed AssetsHelpers from editor window to context menu workflow.
This commit is contained in:
18
Editor/AssetsHelpers/Helpers/AssetCreationHelpers.cs
Normal file
18
Editor/AssetsHelpers/Helpers/AssetCreationHelpers.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
|
||||
namespace Misaki.ArtToolEditor
|
||||
{
|
||||
public static class AssetCreationHelpers
|
||||
{
|
||||
public static GameObject CreateDecal(string path)
|
||||
{
|
||||
var decal = new GameObject("Temp_Decal");
|
||||
decal.AddComponent<DecalProjector>();
|
||||
PrefabUtility.SaveAsPrefabAsset(decal, path);
|
||||
Object.DestroyImmediate(decal);
|
||||
return AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e43fc7bacddd9a46ba17e461058fc90
|
||||
Reference in New Issue
Block a user