Jump to content

Spawner and GameObject inherits


Mussorable
Go to solution Solved by Bryan,

Recommended Posts

Hello everyone, I'm actually a newer in unity and Gaia. I have a question touching Game Object Spawner's. If I pick to spawn Game Objects instead of trees, terrain textures or something like that, are scripts from Game Objects inherit too? As i explored before, spawned trees or another terrain objects cannot be interactive with player or inherit their own scripts. Do we have any way to spawn Game Objects with their own behavior using Spawner methods?

 

Have a good day, thank you.

Link to comment
Share on other sites

10 hours ago, Meudes said:

Have you tested Resource Type: GameObject ?
( -> Spawner -> Ressource Settings )

That's what I mean, I havn't tried it yet, but I'm asking is Game Object from that list inherits scripts too or I should to use another way. Thx

Link to comment
Share on other sites

  • Solution

Sorry not 100% sure what you are asking but I think I know. 

If you use a spawner and change it to game objects the resource that you put in (which should be a prefab) will be used. Meaning if that prefab of a tree has a script on it then when you inject that into the spawner and spawn it, all those trees will have the script on it as well. 

Now, the important thing to note, if you are spawning Trees as gameobjects be very careful or it will take performance. 
You are better off creating a script that changes the tree from terrain tree to Gameobject if lets say a player get close to it. 

Just something to keep in mind. 

Also, if you are happy with the product and support please don't forget to leave a review on the Unity asset store 🙂

Link to comment
Share on other sites

16 hours ago, Bryan said:

Sorry not 100% sure what you are asking but I think I know. 

If you use a spawner and change it to game objects the resource that you put in (which should be a prefab) will be used. Meaning if that prefab of a tree has a script on it then when you inject that into the spawner and spawn it, all those trees will have the script on it as well. 

Now, the important thing to note, if you are spawning Trees as gameobjects be very careful or it will take performance. 
You are better off creating a script that changes the tree from terrain tree to Gameobject if lets say a player get close to it. 

Just something to keep in mind. 

Also, if you are happy with the product and support please don't forget to leave a review on the Unity asset store 🙂

Thank you very much, it's asnwer much better, that I can expected before. Thank you very much

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...