Tag Info

New answers tagged


Multiple solutions: Pass a callback to the moveTo function that can check other things from inside the loop and optionally stop it in the middle. Create two new coroutines - one for movement, one for doing things while moving. Yield main thread until either of the two has finished, abort the remaining one afterwards. Turn movement into state, resolve it in ...


An alternative to the answer of @KevLoughrey would be: uint framesSinceStartup; void Update() { framesSinceStartup++; } This is probably the same thing that Unity does for counting frames.


You can retrieve the number of frames that have passed with Time.frameCount();, if that's what you're looking for. http://docs.unity3d.com/ScriptReference/Time-frameCount.html From there, writing to a file in C# is pretty trivial: http://forum.unity3d.com/threads/how-to-write-a-file.8864/


We had the same problem but finally we solved it. The problem was the gameobject which holds the Animator component must be active on the scene before you set the variables.


I always make resources be referenced by userdata so I can: Know what I'm accessing in the native code side (I could use a pointer and some kind of mambo jambo to do that but that is subject to another topic) and add it to the registry and in that way creating a reference to it that the garbage collector won't touch. Refer to Lua registry section 1 Hope ...


There is no one way to bind an engine with a scripting language, nor is there really an easy way or a best way, it's all very dependent on your architecture, scope and ambitions, I can think of two basic strategies to accomplish what you want. The first option you already suggested: Calling functions from the VM, this is is the simplest and easiest solution ...


It might be worth using an existing scripting language unless you really really REALLY want to do this yourself. You will need to write an interpreter for your scripting language and a library to expose your game engine API to the interpreter. Writing the interpreter and library is a fair amount of work in and of themselves but there is more, you also need ...


That depends on how you distribute the workload on your team and how much you want to add to the project. Someone who does nothing except producing audio files and never even touches the unity editor can still add value to the team. Just ask the other team members what sound effects they need, provide them with the files and let them worry about getting the ...


So turns out the solution was quite simple. When creating my threads I needed to get the reference to that thread, or it would get destroyed by the garbage collector. Why this didn't manifest when running only one script is beyond me, maybe someone can provide a good answer for that? New CreateThread method, for reference. lua_State* ...

Top 50 recent answers are included