Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
613 B

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