Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

error CS0117: `UnityEngine.Quaternion' does not contain a definition for `indentity'

Discussion in 'Scripting' started by Dev_23, Sep 27, 2015.

  1. Dev_23

    Dev_23

    Joined:
    Oct 4, 2014
    Posts:
    18
    Hi,

    I just got this error on my script, and I'm not sure what's causing it. I've looked at a few other questions, but I can't figure out how to fix it. It's on the Instantiate, it says that Quaternion doesn't contain a definition for "identity." Here is my code:

    Code (CSharp):
    1.  
    2.     public Transform OrangeSquare,BlueSquare;
    3.  
    4.     private int SquareColor;
    5.  
    6.     private  Transform InstanColor;
    7.  
    8.     void CreateSquare() {
    9.         SquareColor = Random.Range(0,1);
    10.  
    11.         if (SquareColor == 0) {
    12.        
    13.             InstanColor = OrangeSquare;
    14.         } else {
    15.  
    16.             InstanColor = BlueSquare;
    17.         }
    18.  
    19.         Instantiate(InstanColor, new Vector3 (0, 2, 0), Quaternion.indentity);
    20.     }
     
  2. RiokuTheSlayer

    RiokuTheSlayer

    Joined:
    Aug 22, 2013
    Posts:
    356
    Identity.

    Case matters

    And you spelled it wrong
     
  3. Dev_23

    Dev_23

    Joined:
    Oct 4, 2014
    Posts:
    18
    Ah, spelling it wrong was the thing. But it is lowercase
     
  4. RiokuTheSlayer

    RiokuTheSlayer

    Joined:
    Aug 22, 2013
    Posts:
    356
    Really? Huh...
     
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860