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

[0b4] Editor: PrefabUtility.InstantiatePrefab from a scene prefab how to? Or broken?

Discussion in 'Prefabs' started by Quatum1000, Oct 7, 2018.

  1. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    888
    Hi,

    I'd like to clone a prefab that is already in the scene as a prefab.

    Code (CSharp):
    1. var go = PrefabUtility.InstantiatePrefab(scene_prefab) as GameObject;
    That produce a null gameobject. I tried gethandleof... and others, but that does not work anyway.
    I'm doing anything wrong? Never had this issue.

    Thank you..