- Home /
How do I use the "CreateAssetMenu" attribute?
Hi
I've been playing around with my own scriptable object and I want a simple way to create it. So I've been looking into the "CreateAssetMenu" attribute and I can't find any way to actually use it. I place "[CreateAssetMenu()]" on top of my class. Now this gives me no error. But as soon as I put anything in the brackets it gives me an error. Of that I can figure out it needs string, string, int. I did that and no luck. How do I use it?
Any help is appreciated!
(And yes, I know there are other ways but I would like to try this out and see how it works and see if it better than the other way I am currently using at the moment.)
Answer by TrainWrek · Oct 10, 2015 at 09:20 PM
[CreateAssetMenu(fileName = "New Weapon")]
You can do this to change the variables of the attribute. ,[CreateAssetMenu(fileName = "New Weapon")] Use this to change the variables of the attribute.
Your answer

Follow this Question
Related Questions
Make Unity attributes like [range] work together with inheritance in ScriptableObjects 1 Answer
scriptable objects slow down the editor 1 Answer
Does Apple allow you to download assetbundles with scriptableobjects, from an external server? 0 Answers
Giving a ScriptableObject asset reference to all instances of a MonoBehavior? 0 Answers
How to access derived class members from base class type 1 Answer