Hi guys,
i made a level builder with untiy (with editor window api) that saves objetcts positions as level in json file
1-Is this okay(this style)?
2-Is it okay to load the levels with resource.load?it will have memory issue?
Hi guys,
i made a level builder with untiy (with editor window api) that saves objetcts positions as level in json file
1-Is this okay(this style)?
2-Is it okay to load the levels with resource.load?it will have memory issue?
A general rule of thumb when coding is that if you are using a well maintained and professional code like Unity’s it will probably work just fine, it’s implementing your own solutions to already well solved problems that you should be weary of. Though I am not saying don’t solve things yourself just that it is more likely to go wrong than using a good library.
So yes, this is fine and in fact if you take a look at the docs, they already have the pattern for loading a JSON file using Resources.Load. Memory is almost never an issue when doing anything on modern computers, as long as your file size doesn’t somehow get to gigabytes in size it should be fine. If it does then you will have to do some stuff to manually convert it to an object a little bit at a time probably, but it might just work anyway. I recently used Resources.Load for one of my tools and it worked well.