Unity Asset Usage

Hey all
How do you use scripting assets in you projects?
It’s super tempting to use premade solutions, but then once I find something I need to tweak to fit my purpose, I get annoyed and fall back is to try and recreate the entire wheel myself. I like to understand all parts of my code, but the downfall of this, of course, is a longer timeline for development (and perhaps not the best practice solution).

For example, if you were to import the Steam VR asset, would you open an example scene, pull a prefab for Player, which includes teleporting and grabbing objects, and put it in your own scene. Then, just add to their script to make it expand into your game?
Or
Would you try and dig through their scripts to find the one thing they did, backwards engineer/debug, and put it into your own classes?

Cheers
Will

I’d read the documentation, which should hopefully go so indepth as to include things like the API. Anything less and I just wade through code trying to pick things apart.

Yes, any well-designed asset (like say this one or this one ;)) will have a clean, well-encapsulated API that is easy to integrate with the rest of your app. And like @Murgilod says, you should expect that API to be documented, so you don’t have to go digging through code (though sometimes it’s nice that you can do so if you really need to).

That said, I have occasionally tried a couple of assets that were big hairy plates of spaghetti, and pretty much wanted to take over the entire project. In those cases I usually put up with it for only a week or two before ripping it out and writing my own solution.

1 Like

I always expect to modify them or use them as starting point to whatever I need. It save me time reinventing the wheel from scratch, ie even if I end up rewriting entirely, at least I have something that works to look at to kickstart, instead of running in circle asking myself what did I didn’t get. I mean I use them to see how they did it first.

1 Like

A bit of everything.

For non critical or boring stuff, I’ll just grab an off the shelf solution and plug it in. If it works without too much difficulty I will call it done and never touch it again.

If stuff is critical or interesting, I’ll write it myself. But that doesn’t preclude me using something someone else wrote as a base. At the very least I’ll google around to make sure there are no hidden pit falls waiting for me.

Once I’m done with writing a system, I’ll normally wrap it up in a decent API and then pretend its a black box that I know nothing about.