I’ve faced something strange:
class tmpcont : iUnifiedVariableContainer
iUnifiedVariableContainer db = new tmpcont();
Debug.Log(db.debugString("me!"));
Debug.Log(db.debugString("me!"));
Debug.Log(db.debugString("me!"));
Debug.Log(db.debugString("me!"));
Debug.Log(db.debugString("me!"));
Method debugString is pretty simple, it just returns its parameter, but it sequential calls only works on first time:
Opening name me!
UnityEngine.Debug:Log (object)
iUnifiedVariableContainer:debugString (string) (at Assets/Scripts/Import/UDB/Interfaces/iUnifiedVariableContainer.cs:260)
StormTest:DebugGDX () (at Assets/Scripts/Editor/Tests/StormTest.cs:331)
STUB_me!
UnityEngine.Debug:Log (object)
StormTest:DebugGDX () (at Assets/Scripts/Editor/Tests/StormTest.cs:331)
Exception: Me should not be called!
iUnifiedVariableContainer.die () (at Assets/Scripts/Import/UDB/Interfaces/iUnifiedVariableContainer.cs:266)
StormTest.DebugGDX () (at Assets/Scripts/Editor/Tests/StormTest.cs:332)
For some reason C# for second time calls not “debugString” method, but NEXT method in interface (iUnifiedVariableContainer.die()).
There are no problems if I define db as tmpcont and call similar class method, but I am trying to use legacy code of some old game (“Echelon: Wind Warrior”) as mush as I can.
So, the questions is:
WHY?!?!?