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

Am i going crazy? Why won't this run

Discussion in 'Scripting' started by Nanako, Nov 14, 2015.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    My code: http://www.pasteall.org/62190/c

    It's a pretty simple AI script i wrote. I can't get it to output any debug messages at all. I've put one in Awake, which should be the starting point. but just nothing happens at all. Even if i drop it into a newly created cube with nothing else changed.

    unity isn't giving me any compile errors, i can enter play mode just fine. the console stays completely empty
    help!
     
  2. ehdeekay

    ehdeekay

    Joined:
    Nov 9, 2012
    Posts:
    18
    Obviously I cannot debug the entirety since you have some hookups I have no access too. When I strip them out I see everything clearly in the debug console.

    I just threw it on the Main Camera and ran it.

    Debug (Awake > mentalstate 0 > Refcheck > Mentalstate switch 1 0 > Refcheck > Refcheck)

    Have you tried restarting? Sometimes things just don't work.
     
  3. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    i think you're right. It just didn't work for a completely inexplicable reason. the unity editor is a little buggy :( restarting fixed it