playMaker

Author Topic: How to in prefab, specify scene object?  (Read 1603 times)

qaaz345

  • Playmaker Newbie
  • *
  • Posts: 39
How to in prefab, specify scene object?
« on: February 27, 2014, 12:22:19 PM »
hi
sorry, I can't write english very well

« Last Edit: February 27, 2014, 12:26:47 PM by 문도현 »

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: How to in prefab, specify scene object?
« Reply #1 on: February 27, 2014, 01:00:40 PM »
I solved this by creating a global variable, have a scene object at the start of the scene assign that object to that global variable. Then in my prefab, just point it to the game object variable, rather then scene object.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to in prefab, specify scene object?
« Reply #2 on: February 27, 2014, 01:32:05 PM »
Prefabs do not exist in the scene, and therefore cannot know what you want it to interact with until you create it in the scene and assign the information at runtime or between scene objects in the editor.. This is a Unity limitation and needs to be in place to separate Scene and Project hierarchies/assets.

So you placed the Look At object from the Project prefabs, but once its in the scene its just an instance of that prefab.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D