![]() Line 30 in RFPS 1.23+, Line 19 in RFPS 1.21-1.22: public UnityEngine.UI.Text uiText = null Then, in the Start() and SwitchWeapon() methods in WeaponBehaviour.cs, set AmmoText’s Text element. In AmmoText.cs’s Update() method, set the Text element’s text value to ammoGui.ToString(). Add a public variable for it to AmmoText.cs. ![]() To do this, it needs a reference to the Text element. Instead, AmmoText should update the Text element on your weapon’s canvas. Set their colors to 0 to make them invisible.Ĥ. The RFPS player prefab loads a HUD prefab named AmmoText that contains two GUITexts, one for the main counter text and a child for the drop shadow. If you don’t want to show an ammo count (such as for a knife or flashlight), don’t add a canvas to the weapon.ģ. ![]() You can use a screen space canvas if you don’t want it positioned on the gun. World space means it’s rooted to a position on the gun, rather than overlaying the screen in screen space. This page contains an unofficial “how-to” for using the new Unity UI to show ammo text in Azuline Studios’ Realistic FPS Prefab (RFPS). (Realistic FPS Prefab is developed by Azuline Studios.)ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |