mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
chore: delete dead code (#470)
This commit is contained in:
parent
55e662be66
commit
8b60cdb6fc
@ -36,18 +36,6 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
{
|
{
|
||||||
internal static event Action OnChangeAction;
|
internal static event Action OnChangeAction;
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
if (!RuntimeUtil.isPlaying || this == null) return;
|
|
||||||
RuntimeUtil.OnDemandProcessAvatar(RuntimeUtil.OnDemandSource.Awake, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
if (!RuntimeUtil.isPlaying || this == null) return;
|
|
||||||
RuntimeUtil.OnDemandProcessAvatar(RuntimeUtil.OnDemandSource.Start, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void OnValidate()
|
protected virtual void OnValidate()
|
||||||
{
|
{
|
||||||
if (RuntimeUtil.isPlaying) return;
|
if (RuntimeUtil.isPlaying) return;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* MIT License
|
* MIT License
|
||||||
*
|
*
|
||||||
* Copyright (c) 2022 bd_
|
* Copyright (c) 2022 bd_
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
* in the Software without restriction, including without limitation the rights
|
* in the Software without restriction, including without limitation the rights
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
* furnished to do so, subject to the following conditions:
|
* furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software.
|
* copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
@ -46,16 +46,6 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
OnMenuInvalidate?.Invoke();
|
OnMenuInvalidate?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum OnDemandSource
|
|
||||||
{
|
|
||||||
Awake,
|
|
||||||
Start
|
|
||||||
}
|
|
||||||
|
|
||||||
public delegate void OnDemandProcessAvatarDelegate(OnDemandSource source, MonoBehaviour component);
|
|
||||||
|
|
||||||
public static OnDemandProcessAvatarDelegate OnDemandProcessAvatar = (_m, _c) => { };
|
|
||||||
|
|
||||||
internal static T GetOrAddComponent<T>(this Component self) where T : Component
|
internal static T GetOrAddComponent<T>(this Component self) where T : Component
|
||||||
{
|
{
|
||||||
var component = self.GetComponent<T>();
|
var component = self.GetComponent<T>();
|
||||||
|
Loading…
Reference in New Issue
Block a user