Creating Canvas & UI TextChanging “Anchor” of UI TextChanging “Anchor” to “Top-Left”adding codes to “Game Controller” scriptadding Text UI to “Game Controller” script as a referenceAdding Codes to “DestroyByContact” script | making a reference of “Game Controller” to use “AddScore” Functionsetting Score Value in Asteroid PrefabCreating “Game Score” Script
Another way of setting Score UI
Game Score ScriptAdding “Game Score” script to Text UITagging UIadding codes to increment score after destroying a hazard