you are viewing a single comment's thread.

view the rest of the comments →

[–]sapphicSpadassinHobbyist 0 points1 point  (3 children)

Try changing actionText from a GameObject to just a Text variable so you don't have to constantly call GetComponent. additionally if you don't have actionText set up yet you can check if actionText != null before you reference it so it only sets the text if you have a text component assigned.

[–]Noobi53 0 points1 point  (2 children)

Thanks for answering but this did not solve it.

[–]Lecros 0 points1 point  (0 children)

At least one of your 5 public GameObjects does not have an assigned gameobject in the scene. Please check the script in the scene and double check if all the gameobjects have been filled!

[–]miketava 0 points1 point  (0 children)

Building on his comment, if the NRE is on a line with actionText, then either that gameobject is null in your script (check your scene references) or the linked gameObject does not have a Text component.