- Home /
Is there a way to modify code during compile-time.
Hi, I'm building my own HLAPI for networking and in doing so I've started doing something close to the NetworkBehaviour from unet. I'd like to make RPCs work in much the same way. I can make all of this work, however in order to call a function and have the engine automatically call it on the connected computers I'm currently sending in an array of objects.
What I woulkd like to do is essentially when unity compiltes my script, tell it to change: new object[] { 1, 2, 4 }
into: networkMessage.addInt(1).addInt(2).addInt(3);
So I can write easy to read/maintain code, while still getting the optimizations of building the message manually.
Is there any way to modify code while compiling?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How do I access mega-fiers classes/components in javascript? 2 Answers
compile error with this script 1 Answer