Unity-Technologies / UnityPlayground

A collection of simple scripts to create 2D physics game, intended for giving workshops to a young audience
MIT License
870 stars 164 forks source link

Error Picking Coin on RogueLike #12

Closed romifauzi closed 6 years ago

romifauzi commented 6 years ago

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/_DONTUSE/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

ciro-unity commented 6 years ago

Hey @romifauzi, thanks for putting the issue in. I will take a look at this as soon as I can!

booyaa commented 6 years ago

I think this has been resolved, can't reproduce with the Jan18 build of the package. download link

ciro-unity commented 6 years ago

Thanks @booyaa, yes it should be resolved :)