private void Awake()
        {
            if (this.Obj == null)
            {
                this.Obj = (this._animal ?? (AnimalBase)((Component)this).GetComponent <AnimalBase>()) as INicknameObject;
            }
            if (this.Obj == null)
            {
                return;
            }
            this._outputter = !Singleton <MapUIContainer> .IsInstance() ? (AnimalNicknameOutput)null : MapUIContainer.NicknameUI;

            if (Object.op_Equality((Object)this._outputter, (Object)null))
            {
                Object.DestroyImmediate((Object)this);
            }
            else
            {
                this.Obj.NicknameEnabled = true;
                this._outputter.AddElement(this.Obj);
                ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnEnableAsObservable((Component)this), (Func <M0, bool>)(_ => this.Obj != null)), (Action <M0>)(_ => this.Obj.NicknameEnabled  = true));
                ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDisableAsObservable((Component)this), (Func <M0, bool>)(_ => this.Obj != null)), (Action <M0>)(_ => this.Obj.NicknameEnabled = false));
                ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDestroyAsObservable((Component)this), (Func <M0, bool>)(_ => this.Obj != null)), (Action <M0>)(_ =>
                {
                    if (!Object.op_Inequality((Object)this._outputter, (Object)null))
                    {
                        return;
                    }
                    this._outputter.RemoveElement(this.Obj);
                }));
            }
        }