Example #1
0
    protected override void Awake()
    {
        if (_handle != IntPtr.Zero)
        {
            return;
        }

        _handle = CP.cpGearJointNew(IntPtr.Zero, IntPtr.Zero, 0f, 0f);

        var gch = GCHandle.Alloc(this);

        CP._cpConstraintSetUserData(_handle, GCHandle.ToIntPtr(gch));
    }