create asset menu unity

Code Example - create asset menu unity

                
                        [CreateAssetMenu(fileName = "Name", menuName = "ScriptableObjects/NewScriptableObject", order = 1)]
                    
                
 

unity createassetmenu

                        
                                using UnityEngine;
using System.Collections;

[CreateAssetMenu(fileName = "Data", menuName = "Inventory/List", order = 1)]
public class MyScriptableObjectClass : ScriptableObject {
    public string objectName = "New MyScriptableObject";
    public bool colorIsRandom = false;
    public Color thisColor = Color.white;
    public Vector3[] spawnPoints;
}
                            
                        
 

Related code examples