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

Missing scripts when making canvas for HUD

Discussion in 'UGUI & TextMesh Pro' started by JustJeff, Apr 19, 2015.

  1. JustJeff

    JustJeff

    Joined:
    Feb 16, 2015
    Posts:
    84
    http://unity3d.com/learn/tutorials/projects/survival-shooter/health-hud

    ^ I'm going through that tutorial but when I made a canvas object, the gameobject has the Rect Transform and Canvas objects it should but it has 2 slots for scripts and it could not load them.

    It seems like one maybe should be GraphicRaycaster as per the tutorial but what is the other one and why can't I find these in my project? Shouldn't they be there since they are part of the UI Element I added (canvas?)?

    Thanks :)
     
  2. JustJeff

    JustJeff

    Joined:
    Feb 16, 2015
    Posts:
    84
    Ok yeah this is super bothersome... I went through and put a little heart sprite image for health and when I run it with that it says missing script and gives this message:

    Whatever it's "fixing" screws up my pathfinding algorithm somehow...
     
  3. Rich_Adam

    Rich_Adam

    Joined:
    Apr 22, 2015
    Posts:
    1
    I am running into this issue as well. Is there a fix? I am running 5.0.1f1 personal.
     
  4. JustJeff

    JustJeff

    Joined:
    Feb 16, 2015
    Posts:
    84
    Apparently it's just super messy... I found another thread that's been going a while with replies as late as this month about similar things not working.

    I've just moved on and did my GUI manually with OnGUI functions and setting the rects for icons, stats, etc. programmatically.
     
  5. hi-soft

    hi-soft

    Joined:
    Nov 25, 2013
    Posts:
    2
    I use 5.0.1f1 personal, create my first scene.
    Add ui-text, push run, and give error
    GameObject (named 'Image') references runtime script in scene file. Fixing!
     
    Last edited: May 6, 2015
  6. hi-soft

    hi-soft

    Joined:
    Nov 25, 2013
    Posts:
    2
    I save main project, start new project add Text, and cant see error.
    I reopen my main project, add Text, cant see error. wtf?!
     
  7. ISofK

    ISofK

    Joined:
    Mar 19, 2015
    Posts:
    4
    Same issue and version here. It's canvas specific, whether I create Text or Image, this persistent error just keeps coming back. Scripts on both the canvas and events system just display a weird icon -like a cut image- and no name.
    I see this has been first posted here about 6 weeks ago, but I saw the same problem arising in questions posted in 2012. Not a single Unity "official" has said a word in both dates!!

    P.S. It has nothing to do with the tut mentioned in the OP. I'm just creating a canvas for a 2D game I'm making.
     
  8. ISofK

    ISofK

    Joined:
    Mar 19, 2015
    Posts:
    4
    Since nobody cared to answer, my solution was to start a new project and it worked!
     
  9. TheAshski

    TheAshski

    Joined:
    Jul 18, 2016
    Posts:
    1