Sure, just reply here with the zip file link and I’ll take a look.
Hi,
Ok, so I have your project, I’ve run the game, I see some text “I was added programmatically” and there are no errors.
So the script appears to be fine. If you haven’t already, try closing Unity and re-launching it, re-opening your project. Looks ok at this end though.
Oh, huh. Thanks a lot for looking! Guess I’ll just restart it then.
… Did you like the name of the zip file :3
hehe, yeah, very good.
There’s a note above by @StormFolio who mentioned he used Unity’s refresh option which resolved the issue of not having State on the Create menu, but he doesn’t mention the error that you received.
Try closing/re-opening and see if that fixes the issue first, but code wise, its all good
I saw that and thought it’d be the solution but when I tried nothing happened. Good to know the code is all good though! Thanks a lot for the help! Should be able to go through to the course as usual now!
Thanks a lot for the help! Should be able to go through to the course as usual now!
You’re very welcome and cool - enjoy
I’ve had no issues just want to say a big THANK YOU! because having done the original version (prison break), this is a much better way to do a Text Game, so again THANK YOU SO MUCH! States are amazing.
I know some are having problems with Right-Clicking in the Assets area and not having the option to Create->State.
I had this issue as well, and it turns out there are two important things to do so you can do this.
-
Make sure you Save your script in Visual Studio before coming back to Unity
-
Once you are back in Unity, Right-Click and Refresh.
I know many are having problems with Right-Clicking in the Assets area and not having the option to Create->State.
I had this issue as well, and it turns out there are two important things to do so you can do this.
-
Make sure you Save your script in Visual Studio before coming back to Unity
-
Once you are back in Unity, Right-Click and Refresh.
Hi, towards the end of this lecture i noticed my Unity console displaying an error and I’d like to know why.
Assets\AdventureGame.cs(10,27): warning CS0649: Field ‘AdventureGame.titleText’ is never assigned to, and will always have its default value null
Here is my AdventureGame script :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdventureGame : MonoBehaviour
{
[SerializeField] Text storyText;
[SerializeField] Text titleText;
// Start is called before the first frame update
void Start()
{
storyText.text = ("You may have discovered the most amazing oppourtunity to ") +
("quickly make millions...") +
("You're going to rob a bank...");
titleText.text = ("Let's Rob A Bank");
}
// Update is called once per frame
void Update()
{
}
}
Any help? Thanks
Hey there, guys!
Have a question here. I have created a state with a dropdown menu. And now I cannot change the size of the Story text field in it.
I tried restarting Unity, and refreshing Unity with cmd+R buttons.
I have no clue what’s wrong
I got the same problem. I think it might be a bug with the current version of unity, might be worth changing version.
is to crucial to change the version of unity? If you project is managed in one version, can you load it in previous one?
I am using Unity version 2019.3.0a5 and I’m encountering the same problem of ‘State’ not appearing in create menu.
I’ve tried refreshing and re-opening and recreating but none worked.
The message in console says ‘menuName’ could not be found and is missing some reference.
Please help
I tired refreshing the menu and also restarting unity as well as visual studio. All my code is exactly as typed in the video. I still can’t create state and wasted a lot of time on it.
I have this issue also the text area on the unity component is only 1 line no matter how I change the numbers in [TextArea(10,14)] do we know if this is a bug with the current version of unity?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = “State”)]
public class State : ScriptableObject
{
[SerializeField] string storyText;
}
This will not create the dropdown menu State for me, any help?
Hello, I am trying to get the State Component in the inspector but is not populating there, I have verified the code and it looks exactly as yours do, but still i am not getting the state component to attach the Text Component.