I'm developing a game in Unity3d, economic strategy. I wonder if I should code logic inside unity scripts, or write it as an external module/library?
By game logic I mean game model, which describe game entities, they relation with each other, their methods. And this logic has nothing to do with and doesn't need to know anything about networking, rendering, representation etc.
If I do it inside unity scripts, then logic is tied to unity engine and I don't see a way to implement multiplayer(client-server) without rewriting whole logic for server-side, where unity cannot be used.
I would like to define logic outside of scripts, and later, reference it inside some "main" unity script. This way I could implement multiplayer easily.
Is this a common practice, or should I avoid it, or maybe there is some alternative patterns?