Search Unity

Bug of Unity or not ?????

Discussion in 'Scripting' started by Rhyusaky, Apr 9, 2016.

  1. Rhyusaky

    Rhyusaky

    Joined:
    Jan 22, 2016
    Posts:
    25
    Guys, I created a variable that receives a value perlin noise, the code and that:
    Code (CSharp):
    1. float Wave = PlanetFactor*Mathf.PerlinNoise(X+PlanetSeed/Mathf.Sqrt(X),Y+PlanetSeed/Mathf.Sqrt(Z)+Y);
    2. int WaveInt = Mathf.FloorToInt(Wave);
    And the mysterious error I get and this:
    Code (CSharp):
    1. "NullReferenceException: Object reference not set to an instance of an object
    2. (wrapper unknown) uint16:PtrToStructure (intptr,object)"
    3. And this:
    4. "NullReferenceException: Object reference not set to an instance of an object
    5. (wrapper unknown) uint16:PtrToStructure (intptr,object)"
    Can anyone tell me how can I fix it?
    Sorry for the emoticon, text interpreter site detected a smiley where the error was one : P
     
    Last edited by a moderator: Apr 9, 2016
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No idea - should report a bug. Use code tags to avoid :p etc :)
     
  3. Cynikal

    Cynikal

    Joined:
    Oct 29, 2012
    Posts:
    122
    Does PlanetFactor and PlanetSeed actually return a value?
     
  4. ericbegue

    ericbegue

    Joined:
    May 31, 2013
    Posts:
    1,353
    If you're unsure it's a bug, it's not a bug.
     
    Kiwasi likes this.
  5. Rhyusaky

    Rhyusaky

    Joined:
    Jan 22, 2016
    Posts:
    25
    The PlanetSeed and Planet Factor are used only to multiply the perlin noise (I have not mastered well), the problem is that whenever I put factor in more than 1.5, it's this error.[/QUOTE]