Author Topic: How do I bind shared code to Yemulator?  (Read 1971 times)

Dechcaudron

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
How do I bind shared code to Yemulator?
« on: May 17, 2014, 05:51:06 PM »
Hey there,

So, on being created, the Yemulator project has some MyGame*.cs scripts attached which belong eventually to GameCore folder inside of Unity project. I assume that is what you call Shared Code. How can I make new scripts that I create inside of that GameCore folder be attached the same way to Yemulator? It does not seem to happen automatically :(

Thanks beforehand!
Dechcaudron

AMarinov

  • Global Moderator
  • Newbie
  • *****
  • Posts: 17
    • View Profile
Re: How do I bind shared code to Yemulator?
« Reply #1 on: May 22, 2014, 11:50:31 AM »
Nice question :)
We will provide a better solution for this in the next version of the emulator, but for now it have to be done manually.
This is how you can link files to the Yemulator project:
For Xamarin:
Right click the project (Yemulator) and select "Add - >Add Files..", then go to the folder containing the shared code, for the demo that would be: "DamoGame\Assets\GameCore\", select the new .cs files, and press "Open" button, it will display a dialog window like this:



You should select the "Add a link to the file" option, then press OK.

For Visual studio it is almost the same:
Right click the project and select from menu "Add -> Existing item...", select the new source files, and use the "Add as link" option:





Dechcaudron

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: How do I bind shared code to Yemulator?
« Reply #2 on: May 22, 2014, 02:14:12 PM »
Awesome! Thank you!