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. Dismiss Notice

Tree Unity : The referenced script on this Behaviour is missing!

Discussion in 'Editor & General Support' started by Spi, Jun 26, 2012.

  1. Spi

    Spi

    Joined:
    Oct 4, 2011
    Posts:
    21
    Hi,

    I would like to submit a strange error message in the output_log.txt when I run the standalone application of my Unity scene.
    <
    The referenced script on this Behaviour is missing!
    A script behaviour has a different serialization layout when loading. (Read 36 bytes but expected 111628 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    >

    I think this is caused by the Unity Tree because it doesn't happen when there are no trees in the scene..

    Here is the thing :

    I dynamically load a prefab (not a unity terrain) that contains an occurence of a Unity Tree prefab...
    Is it a Unity bug ? Trees are working fine in the scene but I'm worried about this error message...

    Best Regards,
    Rudy Morin
     
  2. Tct1856

    Tct1856

    Joined:
    Jan 22, 2010
    Posts:
    104
    This means, you have deleted a script somewhere.

    You would get the same behaviour if you do the following:
    * Create game object
    * Create a script
    * Attach a script to game object
    * Delete the script
    * If you would inspect the game object, it would say Missing MonoBehaviour.
     
  3. Spi

    Spi

    Joined:
    Oct 4, 2011
    Posts:
    21
    Yes this is what I thought but there is no script attached to the tree, it is managed by the treeCreator !

    And when I remove the Tree, no more errors...