woffles Posted July 25, 2022 Posted July 25, 2022 Hey everyone, I've been doing some fooling around with GeNa Pro and Gaia Pro 2021 recently for my game. I have found that when splitting my Gaia world into tiles and using GeNa's runtime API to spawn objects (as is required within my game), the prefabs and objects that GeNa spawns do so on the water on unloaded tiles, probably just due to the fact that the tiles don't exist. I was wondering if there was a fix to this, or a way that I could work around it. One idea I thought might work would be to enable all terrains at the start, generating the objects, then disabling terrains out of sight as the loader does already. This would require some modifications of the Terrain Loader script, so I am cautious about doing anything to it for the time being. Thank you!
Bryan Posted July 26, 2022 Posted July 26, 2022 I will ask the team but yes I feel like you would need to check to see if the terrain is active before running the runtime spawning.
woffles Posted July 26, 2022 Author Posted July 26, 2022 4 hours ago, Manny said: Hey @woffles, Yes, you are correct in saying that the terrains need to be active before spawning onto it. This is the case by design, mainly because GeNa requires an active target before spawning. Your 'workaround' whereby you activate the tiles before spawning is precisely what should happen otherwise the raycasts that are needed for the spawn would not work properly. Hey @Manny, thanks for the quick reply! Would it be okay to directly modify the TerrainLoaderManager script with Gaia then? Since this integration with GeNa as well as Gaia's overall additive terrain loading seems to be (overall) quite undocumented, would I be allowed to change Gaia's source for this instance to make it compatible with GeNa? I ask this specifically since I fear others may also have this issue and won't know what to do due to its lack of documentation. Additionally, when I was chipping away at the TerrainLoaderManager yesterday night after the thread was posted, I wrote a few additive terrain loading options that bridged the gap from Gaia's terrain loading to GeNa. Thank you for your help :)
Solution woffles Posted July 27, 2022 Author Solution Posted July 27, 2022 2 hours ago, Manny said: Hey @woffles, It's no problem at all! Just as an FYI, the Terrain Loading system does indeed have quite a bit of documentation in Canopy. Have a look at this article here: That being said, you're more than welcome to change the code yourself manually to fit your project's situation. However, all I can recommend is that you remember any modifications you've made to the tool before you update Gaia with the new versions on the store because it will overwrite any of your changes made. Happy to help! Thanks @Manny! When I said documentation I meant the TerrainLoaderManager's script and its functions and its integration with GeNa. Your tip on remembering changes has been noted, I'm thinking of storing all my custom code in a separate namespace to make a full-fledged API for GeNa-Gaia integration. Might upload the changed scripts to GItHub in case anybody runs into a similar issue. I appreciate the help!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now