Пример #1
0
    static internal void _UnregisterType(RegisteredComponent component, Type type)
    {
        InstanceContainer container = _GetInstanceContainer(type);

        if (!container.Remove(component))
        {
            Debug.LogError("RegisteredComponentController error: Tried to unregister unknown instance");
        }

        //Debug.Log( "Unregistered " + type.Name + ": " + component.gameObject.name );
    }
Пример #2
0
    static private void _RegisterType(RegisteredComponent component, Type type)
    {
        InstanceContainer container = _GetInstanceContainer(type);

        if (!container.Add(component))
        {
            Debug.LogError("RegisteredComponentController error: Tried to register same instance twice");
        }

        //Debug.Log( "Registered " + type.Name + ": " + component.gameObject.name );
    }
Пример #3
0
    static internal void _Unregister(RegisteredComponent component)
    {
        Type type = component.GetType();

        do
        {
            _UnregisterType(component, type);
            type = type.BaseType;
        } while (type != typeof(RegisteredComponent));

        //Debug.Log( "Unregistered " + component.GetType().Name + ": " + component.gameObject.name );
    }