View Single Post
  #19  
Old 08-09-2011, 09:02 PM
stillborn stillborn is offline
Approved Member
 
Join Date: Sep 2010
Posts: 21
Default

I guess its good to access "imported objects with //$reference" after everything is loaded and initialized. From what i see things differ a bit before and after the initialization of a mission. For example one strange thing i noticed is: The first version of this mission had "Assembly.GetExecutingAssembly().Location" command inside OnBattleStarted Method, which returned a path with "1cSoftClub" in it but the same command returns the launcher.exe path when used as a variable's default value at the top.

I never had an issue with serializability when both deriving the Mission class from a custom class and when using/accessing another class.

if you are not saving your class or another object inside with its current state intentionally, probably something in the process of packing your dll and/or loading it requires serialization, to save or to send it somewhere in memory as a stream, etc. try using alternative approaches when importing/accessing your classes. Hope this helps.

Btw i'm just curious, is there a specific purpose of importing gamePlay.dll via //$reference, which is as far as i know, identical to this
Code:
using maddox.game;
using maddox.game.play;
it would be good to know if there are extra things accessible with that way
Reply With Quote