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

i = Instantiate (Resources.Load<GameObject> ("o" + m.h) as GameObject); - what is wrong with this?

Discussion in 'Scripting' started by JDVDeisgn, Jan 5, 2019.

  1. JDVDeisgn

    JDVDeisgn

    Joined:
    Oct 17, 2015
    Posts:
    148
    I just want to load an object from the Resources folder as in the GameObject slot I assigned as i in my C# script.

    There are no errors in the script in the sense that the game still runs but the script doesn't do what I intended it to do.

    Any help would be much appreciated. Thanks.
     
  2. JDVDeisgn

    JDVDeisgn

    Joined:
    Oct 17, 2015
    Posts:
    148
    Ok it works now sorry.