Skip to content

Error Picking Coin on RogueLike #12

@romifauzi

Description

@romifauzi

Hi,

I've found an error when trying the roguelike scene, when the player tries to pick up the coin, it gaves this error:

MissingReferenceException: The variable resourceItemPrefab of UIScript doesn't exist anymore.
You probably need to reassign the resourceItemPrefab variable of the 'UIScript' script in the inspector.
UnityEngine.Object.Instantiate[GameObject] (UnityEngine.GameObject original) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:201)
UIScript.AddResource (System.String resourceType, Int32 pickedUpAmount, UnityEngine.Sprite graphics) (at Assets/Scripts/DONT_USE/User Interface/UIScript.cs:135)
ResourceAttribute.OnTriggerEnter2D (UnityEngine.Collider2D otherCollider) (at Assets/Scripts/Attributes/ResourceAttribute.cs:33)

and under the UIScript, we can't assign the resourceItemPrefabs, since its hidden by the editor script, how do we fix this?

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions