logoalt Hacker News

BoorishBearsyesterday at 11:38 PM3 repliesview on HN

It's been a long minute since my Unity days, but I'm pretty sure what OP wanted was ScriptableObjects with a custom Inspector

If you setup asset serialization to use text, the ScriptableObjects map to semi-editable YAML files (semi- editable because there are some internal members that show up, but nothing an LLM couldn't handle)


Replies

energywutyesterday at 11:58 PM

Scriptable Objects are exactly what I would use in this case. There's even a whole host of fancy tools to work with them and import/export to csv or other file formats.

danieltanfh95today at 2:54 AM

I already use ScriptableObjects with a custom inspector that outputs to YAML files. the problem was that with increasing use of nested generics+components I would need to spend alot of time customising the inspector. I rather not spend time on tooling and focus on writing game logic.

npinskertoday at 1:00 AM

The downside of that is that cards often have to hook into custom functions that interface with the engine (unless they're sufficiently boring). You can still go with ScriptableObjects if you're willing to e.g. write those functions in Lua and have an interpreter layer, but for all but the largest projects, making each card its own class works well.