Hi peeps. again. i wasted few hours to understand how to access UI object in Unity scene, in code Ok today i'm going to share with you guys, step by step okay! Our objectives here is to Have a text - display from "Hello" to "Hello World" dynamically using UI Text and C# Scripting 1. Create new scene, name it DynamicTextScene 2. Create new UI Object : Canvas, go to Hierarchy Window, right click select UI>Canvas. 3. In Canvas inspector, select its render mode to be World Space. 4. Now create a Text UI, Under the Canvas object, name it as dynamicText. 5. Now add new Button UI, under the Canvas and name it as PressButton. 6. Select the button text, change the button display text to "Press to Change Text" 7. Now select the Canvas, navigate to its Inspector, add new component script, name it as DynamicText. 8. Inside the DynamicText.cs script, code as follow. a.
This is a blog that shares tips on Coding, Website, E-Commerce, Windows, Linux and IT related infos.