Y
Y
yraiv2020-05-17 14:14:01
Unity
yraiv, 2020-05-17 14:14:01

How to set a prefab a link to an object so that it is saved?

When I create an object, Unity swears and does not start:
UnassignedReferenceException: The variable BalanceGive of ClickOnMonstr has not been assigned.
You probably need to assign the BalanceGive variable of the ClickOnMonstr script in the inspector.
I inserted all references to objects in the inspector in the prefab, but when I create the prefab through the script on the stage, this error pops up. How to make the link work after the object appears on the stage?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question