- Home /
AI Coroutine or ScriptableObject ?
i found that most people are using Coroutine for AI on the other side i found official unity tutorials using ScriptableObject ?
what should i use to Create my AI and what is the difference ?
Answer by hexagonius · Apr 08, 2017 at 03:44 PM
A courouine is a way of delaying executions and thus creating timed sequences. They can yield certain conditions like "continue execution when the enemy spotted the player".
A scriptable Object is nothing like that. It's primary use is to serialize values to disk, usually large amounts, or complex structures. You cannot compare them, they're doing different things.
Thank you for your answer
I'm Comparing both because i found people creating state machine with both Like AI (Patrol Chase & Attack)
so i'm asking which one is better in this case ?