Add 'Packages/src/' from commit '32b93d3eeb52c6471244c324d0a6572b756c561a'

git-subtree-dir: Packages/src
git-subtree-mainline: 2aa8d41950
git-subtree-split: 32b93d3eeb
This commit is contained in:
mob-sakai
2024-01-23 14:55:04 +09:00
171 changed files with 109192 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using UnityEngine.Serialization;
namespace Coffee.UIExtensions.Demo
{
public class UIParticle_Demo_UIParticleController : MonoBehaviour
{
[FormerlySerializedAs("root")]
[SerializeField]
private Transform m_RootTransform;
public void UIParticle_MeshSharing(bool flag)
{
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
{
uip.meshSharing = flag
? UIParticle.MeshSharing.Auto
: UIParticle.MeshSharing.None;
}
}
public void UIParticle_RandomGroup(bool flag)
{
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
{
uip.groupMaxId = flag
? 4
: 0;
}
}
public void UIParticle_Scale(float scale)
{
foreach (var uip in m_RootTransform.GetComponentsInChildren<UIParticle>(true))
{
uip.scale = scale;
}
}
}
}