Quantcast
Channel: Answers by "kbaloch"
Browsing index pages (18 articles)
↧

Answer by kbaloch

the problem seemed in update method, you do wrong accidently may be void Update() { if(active == true){ //TimeText.text += Time.deltaTime; this should be time += Time.deltaTime TimeText.text =...

View Article


Answer by kbaloch

you should call your timer method in start method by using invokerepeating just like this void start () { // your code InvokeRepeating("Timer",time,repeatRate); //use your values } void Timer () { //...

View Article


Answer by kbaloch

You can declare enum from outside the class declaration. This way it will accessible for whole assembly (C#). like //file weaponProperties public enum weaponType { Range, Melee } public class...

View Article

Answer by kbaloch

you can not use like this, you should use OnGui() for input like this void OnGUI() { if(GUI.Button(new Rect("your button positon"),"Right")) { // your staf code goes here for right button } else...

View Article

Answer by kbaloch

1) start your animation 2) change your material using this if( renderer.material == material1 ) { renderer.material = material2; } else { renderer.material = material1; }

View Article


Answer by kbaloch

you should do something like this AudioClip otherClip; bool playNow = false; yield WaitForSeconds (audio.clip.length); playNow = true; void Update () { if(playNow) { // Assign the other clip audio.clip...

View Article

Answer by kbaloch

Drag your Player game object to your player variable in this script in inspector window. this error will disappear . or find this using tag or name in start start() { player =...

View Article

Answer by kbaloch

you should try this. public class PlayerController : MonoBehaviour { public bool animation_bool; void Update() { if ( Input.GetAxis( "Horizontal" ) != 0 || Input.GetAxis( "Vertical" ) != 0 ) {...

View Article


Answer by kbaloch

Make these Objets active in Inspector and in your start methode set them invisible like this void start() { water2.SetActive(false); } In C# your OnGUI function is something like this. I dont know...

View Article


Answer by kbaloch

the problem seemed in update method, you do wrong accidently may be void Update() { if(active == true){ //TimeText.text += Time.deltaTime; this should be time += Time.deltaTime TimeText.text =...

View Article

Answer by kbaloch

you should call your timer method in start method by using invokerepeating just like this void start () { // your code InvokeRepeating("Timer",time,repeatRate); //use your values } void Timer () { //...

View Article

Answer by kbaloch

You can declare enum from outside the class declaration. This way it will accessible for whole assembly (C#). like //file weaponProperties public enum weaponType { Range, Melee } public class...

View Article

Answer by kbaloch

you can not use like this, you should use OnGui() for input like this void OnGUI() { if(GUI.Button(new Rect("your button positon"),"Right")) { // your staf code goes here for right button } else...

View Article


Answer by kbaloch

1) start your animation 2) change your material using this if( renderer.material == material1 ) { renderer.material = material2; } else { renderer.material = material1; }

View Article

Answer by kbaloch

you should do something like this AudioClip otherClip; bool playNow = false; yield WaitForSeconds (audio.clip.length); playNow = true; void Update () { if(playNow) { // Assign the other clip audio.clip...

View Article


Answer by kbaloch

Drag your Player game object to your player variable in this script in inspector window. this error will disappear . or find this using tag or name in start start() { player =...

View Article

Answer by kbaloch

you should try this. public class PlayerController : MonoBehaviour { public bool animation_bool; void Update() { if ( Input.GetAxis( "Horizontal" ) != 0 || Input.GetAxis( "Vertical" ) != 0 ) {...

View Article


Answer by kbaloch

Make these Objets active in Inspector and in your start methode set them invisible like this void start() { water2.SetActive(false); } In C# your OnGUI function is something like this. I dont know...

View Article
Browsing index pages (18 articles)


Latest Images