Long story short, the DLL is a COM library that I use to spawn more 3d windows, each window is a DirectX window where I spawn camera’s for each network interface. The Unity window itself is the world observer. Everything in the Unity window is based on what I call my global tracking elements. As a new player arrives in the game, I spawn a new window that is a watcher element. Well this new window needs to be running in its own thread and independent of Unity but at the same time synchronized with Unity.
I wrote a C# wrapper for 3Impact and I have this wrapper in the Assets folder so that I can use the calls directly. With this said, I have full access to not only Raknet in Unity but I have the network access and 2d interface from 3Impact available to me. What I also have is other ActiveX and COM libraries that I have written that interact with SQL and Oracle.
When I start up Unity, I spawn 2 command windows (I like the word spawn, actually I am just Creating them). These windows are my interface to SQL 2008 and Oracle 10, each for their own purposes. All of this interacts with the Unity command window. I have an EGO for SQL, an EGO for Oracle and what I have labeled my puppet EGO which is used for spawning the watcher interfaces. I like Unity’s RDP interface for the peer to peer interface but it lacks some of the other TCP/IP work I need to do. This is just the tip of the iceberg but the bottom line is that both my COM and ActiveX libraries have to reside in the root with the Unity binary otherwise since Unity places everything in the full build (build or build and run), my libraries do not interact at-all. They can’t be in the Data folder, nor can any of the sub folders I use for 3Impact, nor the sub folders I use for either SQL or Oracle, both of which are necessary.
Unfortunately Unity does not permit me to add in ‘external’ folders to include with the program build that are not either in the Data folder or otherwise embedded within the game EXE that Unity builds.
There are many reasons why I am doing the code this way.
I don’t know if this helps to elaborate on the why or not.It is always hard for me to explain what I am doing or even why. I have an entire battle system written in C# for 3Impact that is actually working quiet well for the server side battle results, it took me over 6 months to perfect it and I don’t want to start over on it. It is a side by side library for the game that allows me to express to the players the results of a given battle and receive from the players action requests, in return my library then determines if it is a legal action or not and reacts accordingly.
I have an entire library that is for zone preparation and heart beat information for spawning creatures and events that relies on LUA, LISP and independent libraries I have written, they are all plugins that I have written in C++ but not for Unity, my interface to those plugins also requires the entry point library be in the root with the binary, they have sub folders with rule files that reside on the server, these rule files are nothing more than instructions that are read in and translated then the information is bridged into the game. I can add definition to a new creature or an entire new creature class and creature elements like animation, size, texture, etc then tell the zone file to seed it, spawn it and track it.
I’ve had to ditch some of my Delphi code though, couldn’t get those libraries to work at all for some reason.