blob: 791b758832da498bbcd1015dadefa8451e9e95cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using UnityEditor;
using UnityEditor.ProjectWindowCallback;
namespace AmplifyShaderEditor
{
public class DoCreateFunction : EndNameEditAction
{
public override void Action( int instanceId, string pathName, string resourceFile )
{
UnityEngine.Object obj = EditorUtility.InstanceIDToObject( instanceId );
AssetDatabase.CreateAsset( obj, AssetDatabase.GenerateUniqueAssetPath( pathName ) );
AmplifyShaderEditorWindow.LoadShaderFunctionToASE( (AmplifyShaderFunction)obj, false );
}
}
}
|