urho3d/Urho3D — pull request #565 by alexparlett (2014-12-14 09:48:32+00:00)
Title: ScriptObject can be stored in Variant. 

There is a risk to this as the reference is not increased when storing it so it is only a weak reference so if the original handle isn't stored correctly in the script it can be null.

```
class Test : ScriptObject
{
String msg;

Test()
{
}

Test(const String& msg)
{
this.msg = msg;
}
}

Test@ test1 = Test("I'm a Test");
Variant var = Variant(@test1);

Test@ test2 = cast(var.GetScriptObject());
if (@test2 !is null)
Print(test2.msg);
else
Print("Null");
```