Unity is possible to add a Game Object in hierarchy but not instantiate it?

Cris

I'm not sure if it is possible to create a Game Object in the scene (so it appears in the hierarchy) but I would like Unity to not instantiate (or rather remove it) such Game Object when I press play.

The reason why I want to do that. I'm creating Game Objects as 'enemy spawners' in my game. But I don't want to have those transforms or Game Objects actually in memory while the game is running. So I've created an editor script that search for all the spawner entities, retrieve the information that I need and creates a binary file with it that later the enemy manager reads in run time during the initialization process.

If this is not possible, do you guys have any recommendations on how I could implement something similar?

Many thanks in advance.

Tom Coldenhoff

You are looking for scriptable objects.

Here are some URL's

ScriptableObject Tutorial from Unity

ScriptableObject documentation

ScriptableObjects can be accesed at any time and don't have to be instantiated before you can use them. So they won't have a transform.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Object hierarchy implementation in game engine

From Dev

I get error when instantiate new game object in unity. Can anybody help me with this?

From Dev

Is it possible to instantiate a JavaScript object in TypeScript?

From Dev

Instantiate new "players" in a sub folder in Hierarchy view | Unity networking with Vuforia

From Dev

Add ui hierarchy into the project generated by unity

From Dev

How to instantiate MonoBehaviour objects in a unit test on Unity Game Engine platform

From Dev

Is it possible to export a unity game to iPod touch?

From Dev

Is it possible to convert game written in Torque Game Engine 1.5.1 into Unity?

From Dev

How to make game object transparent in unity

From Dev

Collision Detection for fast moving game object in Unity

From Dev

Unity - How to separate the children of a game object linearly?

From Dev

Unity 3d how to instantiate object in a certian position

From Dev

Qt with PyQt. Is it possible to view the object hierarchy of a running window?

From Dev

Is it possible to instantiate an object in a client if it's defined in a DLL/Lib?

From Dev

How to Instantiate Game

From Dev

Instantiate 'this' Object

From Dev

Trouble getting a game object from object pool in Unity

From Dev

Is it possible to add a variable to an object in rails?

From Dev

Unity Hierarchy Constructor Injection

From Dev

Unable to instantiate a Behavior in Unity

From Dev

Instantiate prefab in Unity

From Dev

Instantiate prefab in Unity

From Dev

Unity - How do I apply an animation from one game object to another rigged game object?

From Dev

How to move a game object in the forwrard direction of an other game object Unity3D

From Dev

Unity3D checking if a point is inside a game object

From Dev

How to make a Game Object point towards the mouse in Unity? (C#)

From Dev

How to check if a game object has a component method in Unity?

From Dev

How to find the length of a 2D game object in Unity

From Dev

how to limit the rotation of a game object in unity3d

Related Related

  1. 1

    Object hierarchy implementation in game engine

  2. 2

    I get error when instantiate new game object in unity. Can anybody help me with this?

  3. 3

    Is it possible to instantiate a JavaScript object in TypeScript?

  4. 4

    Instantiate new "players" in a sub folder in Hierarchy view | Unity networking with Vuforia

  5. 5

    Add ui hierarchy into the project generated by unity

  6. 6

    How to instantiate MonoBehaviour objects in a unit test on Unity Game Engine platform

  7. 7

    Is it possible to export a unity game to iPod touch?

  8. 8

    Is it possible to convert game written in Torque Game Engine 1.5.1 into Unity?

  9. 9

    How to make game object transparent in unity

  10. 10

    Collision Detection for fast moving game object in Unity

  11. 11

    Unity - How to separate the children of a game object linearly?

  12. 12

    Unity 3d how to instantiate object in a certian position

  13. 13

    Qt with PyQt. Is it possible to view the object hierarchy of a running window?

  14. 14

    Is it possible to instantiate an object in a client if it's defined in a DLL/Lib?

  15. 15

    How to Instantiate Game

  16. 16

    Instantiate 'this' Object

  17. 17

    Trouble getting a game object from object pool in Unity

  18. 18

    Is it possible to add a variable to an object in rails?

  19. 19

    Unity Hierarchy Constructor Injection

  20. 20

    Unable to instantiate a Behavior in Unity

  21. 21

    Instantiate prefab in Unity

  22. 22

    Instantiate prefab in Unity

  23. 23

    Unity - How do I apply an animation from one game object to another rigged game object?

  24. 24

    How to move a game object in the forwrard direction of an other game object Unity3D

  25. 25

    Unity3D checking if a point is inside a game object

  26. 26

    How to make a Game Object point towards the mouse in Unity? (C#)

  27. 27

    How to check if a game object has a component method in Unity?

  28. 28

    How to find the length of a 2D game object in Unity

  29. 29

    how to limit the rotation of a game object in unity3d

HotTag

Archive