Use CreateAssetMenu so that we have a context menu to add scriptable objects.
Create our first scriptable object.
After watching (learning outcomes)…
Create our first scriptable object.
(Unique Video Reference: 7_TX_CUD)
We would love to know…
What you found good about this lecture?
What we could do better?
Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…
When I right-click on my project area to create a State file, there is no State file about Folder in the drop down menu. I have looked all over the dropdown and cannot find a file named State to create… I am stuck here now.
Edit: I don’t know if its just a difference in Unity versions but when I pause ricks video, I can see that his assets folder shows up in the inspector. Mine does not.
I’ve double and triple checked the code, it’s identical. I am on a Mac. But yeah, there’s nothing I can do apparently at this point.
Edit #2: I seem to have fixed this though I am not 100% sure how I did it. My best guess is, I realized that I never finished adding “I am added programmatically” to the previous script, AdventureGame. I already knew how to add a text string, so I skipped along in that video to the end, and never finished the script, I had just left it as textComponent.text = ;
Perhaps the issue of not being able to compile this other script correctly was causing issues with the State script? I don’t know, but the second I went back and finished the previous script all of a sudden I could find the State option under create assets. The assets folder also showed up in the inspector.
I have this same problem. No problems in my script, but there are no options to select state from the menu. I do notice there are several assets present in your version that were not included in the previous version, the “State” script as well as the “Starting State” object.
Hi all, am I understanding correctly that you are trying to replicate the thing I am doing in the first 10 seconds of the video? If so, sorry for the confusion, the first part of the video is explaining what we’ll be able to do by the end of the video, not what we can do at the start.
Hi all. My problem isn´t too important but I would still like to fix it. When i created the text file where I wrote the
challenge and I saved in visual studio into my assets file it looked different than in the video and also if i try to open the visual studio text file it wont let me. It only shows up when I open the state script.
It could be that you saved it as something other than a .txt file (text file). Normally we dont use Visual Studio to keep notes like this, so Visual Studio isn’t really expecting us save the file as a text file.
I had to reboot my computer after installing Visual Studio 2017, in order to get the syntax highlighting and code hints to work. A friendly response from the Facebook group led me in this direction, but it would be nice to have a note in this video because this was the first one that I noticed it was an issue.
I have the exact same script, but it dosen’t show up. It cannot recognize CreateAssetMenu, giving me an error.
o:-– Game Stuff\New folder\Assets\State.cs(2,2): Error CS0246: The type or namespace name ‘CreateAssetMenu’ could not be found (are you missing a using directive or an assembly reference?) (CS0246) (Assembly-CSharp)
When we first got the error we just copy and pasted the script from this lecture. It’s exactly the same. If you still need me to send it I can, but it’s just the script at this point of the lecture.
There shouldn’t be a problem with that script, it is, after all, working for many others. But let’s see if we can find out why it isn’t working for you.
If you zip up your project files and share them with me I will take a quick look and see if anything stands out.
The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.