Answer by shriya
Hi, tugle = GameObject.FindGameObjectWithTag("musicToggle") In this it is giving error" it cannot convert GameObject to Toggle" because you have taken **tugle to be toggle object** and assigning it a...
View ArticleAnswer by shriya
Hi, In the first script you have not called the method **MusicChange()**. Call it in Start of the first script. i hope it helps.
View ArticleAnswer by shriya
Check for any errors in the console. Rectify it and then this variable will appear in inspector
View ArticleAnswer by shriya
Problem with your script is Bool replace it with boolean var jump : boolean = false; and it will work. In Javascript its boolean and in c# its bool. Good Luck!
View ArticleAnswer by shriya
In C#, it is done this way Font abc= Resources.Load ("fontname",typeof( Font)) as Font; Hope this helps
View ArticleAnswer by shriya
Try the solution mentioned there> http://answers.unity3d.com/questions/861622/dontdestroyonload-but-script-being-excuted-multipl.html
View ArticleAnswer by shriya
![alt text][1]hi, To make your button scale with your canvas, you need to set it anchors. Make your anchors Stretch stretch . You will notice that all four anchors placed themselves at the corner of...
View ArticleAnswer by shriya
Sorry to trouble you guys.... I figured it out myelf. To save it I used PlayerPrefsX Firstly converted it to int array and then saved itinto PlayerPrefsx intArray = new int[check.Count] ;...
View ArticleAnswer by shriya
hi, I guess your problem is the check. You have said `if (Input.GetButtonDown ("TransformToSecond") && (currentEnergy == 100))` i.e run this code till the time current energy is 100 and just...
View ArticleAnswer by shriya
Hi, Got it working.Check below the scripts using UnityEngine; using System.Collections; public class ScoreperSec : MonoBehaviour { public int startingScore = 0; public int currentScore = 0; public...
View ArticleAnswer by shriya
hi Use below mentioned code using UnityEngine; using System.Collections; public class SCBlueButton : MonoBehaviour { public void ModeSelect(){ StartCoroutine("Wait"); } IEnumerator Wait() { yield...
View ArticleAnswer by shriya
Hi, Follow the below mentioned link http://www.raywenderlich.com/79031/unity-new-gui-tutorial-part-2 It will help you understanding
View ArticleAnswer by shriya
hi David, the problem is private SpriteRenderer spriteRenderer; In this you are assigning one game object and the sprite change is also occuring on the same object. For finding all the objects either...
View ArticleAnswer by shriya
Hi Problem is you are comparing two different things. eg : Vector3(0,50,0) cannot be compared to 10.0f but you can definitely compare 5 >=10 because the values are of same type. if you want to...
View ArticleAnswer by shriya
Hi, I have attached the script.Initially your button should be inactive in hierarchy. Now on clicking mouse it will get active on screen. `using using UnityEngine; using UnityEngine.UI; using...
View ArticleAnswer by shriya
HI, In the method On CollisionEnter method do the following code public void OnCollisionEnter(Collision collision) { StartCoroutine("PauseGame"); } Your character should have rigidbody and a collider...
View ArticleAnswer by shriya
![alt text][1]Hii, Please change settings as per image shared.Your problem might get solved .![alt text][2] [1]: /storage/temp/51079-screen-shot-2015-07-27-at-54155-pm.png [2]:...
View ArticleAnswer by shriya
Hi, This might help :) var FirstPerson: GameObject; var tempTransformroattion_y:float; var jalousie : GameObject; function Start () { tempTransformroattion_y = FirstPerson.transform.rotation.y;...
View ArticleAnswer by shriya
Hi, Check this link. http://docs.unity3d.com/ScriptReference/ForceMode.html
View ArticleAnswer by shriya
HI, Try this function Update() { if(Input.GetKeyDown (KeyCode.E)) { transform.Translate(Vector3.forward * Time.deltaTime*50); // transform.position += Vector3.forward * 20 * Time.deltaTime; }...
View ArticleAnswer by shriya
You have assigned x y z value equal to 0 and you have not applied any change to it. In Update you are Continuously passing (0,0,0). Your code works but since the value doesnot change ,you dont see any...
View ArticleAnswer by shriya
Hi NickZack, I guess you are new to unity. Issues in your Script: 1)Vector2.left does not exist .For this you should use (-Vector2.right). 2) In your Update function which runs continuously , you are...
View ArticleAnswer by shriya
HI Suzit, If I have understood correctly then the solution is mentioned below. Keep your Textures in Resources Folder and name your texture as per alphabet it contains (see attachment). This script is...
View ArticleAnswer by shriya
Hi, You have bluelight.SetActive(true) in both whatever the value of boolean is, it doesnot matter. Your blue light will stay active. And the bool never get true because you are not making it true at...
View ArticleAnswer by shriya
Here you go . Its using swiping with mouse and sweep test & also iTween. iTween script is attached. Place it in your Standard Assets and you are good to go.[link text][1] using UnityEngine; using...
View ArticleAnswer by shriya
Hi aan_comel, You just need static counter. In previous answer mistake is at line where we are setting player prefs on button click using counter it should be through fetching playerprefs but as you...
View ArticleAnswer by shriya
Rigidbody constraints are managed through scripts as mentioned below. rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; A list of all the defined...
View ArticleAnswer by shriya
Hello, Make sure your script is attached to the Main Camera. Also your camera property clear flag should be solid color![alt text][1] [1]: /storage/temp/75828-screen-shot-2016-08-10-at-53536-pm.png...
View Article