예제 #1
0
        public unsafe void HybridComponents_WillThrow_IfRemapped()
        {
            var gameObject = new GameObject("TestHybridComponent", typeof(TestHybridComponent));

            var managedObjectRemap = new ManagedObjectRemap();

            Assert.Throws <ArgumentException>(() =>
            {
                var local = (object)gameObject;
                managedObjectRemap.RemapEntityReferences(ref local, null);
            });
        }
        public unsafe void ManagedObjectRemap_ClassWithSelfReference()
        {
            var a = new ClassWithSelfReference();

            a.Self = a;

            var managedObjectRemap = new ManagedObjectRemap();

            Assert.DoesNotThrow(() =>
            {
                var local = (object)a;
                managedObjectRemap.RemapEntityReferences(ref local, null);
            });
        }