You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-16 13:10:07 +00:00
Update demo
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -37,7 +38,15 @@ namespace Coffee.UIExtensions.Demo
|
||||
|
||||
public void EnableMask (bool enabled)
|
||||
{
|
||||
foreach (var m in m_Masks)
|
||||
foreach (var m in FindObjectsOfType<Mask> ())
|
||||
{
|
||||
m.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableMask2D (bool enabled)
|
||||
{
|
||||
foreach (var m in FindObjectsOfType<RectMask2D> ())
|
||||
{
|
||||
m.enabled = enabled;
|
||||
}
|
||||
@@ -48,5 +57,18 @@ namespace Coffee.UIExtensions.Demo
|
||||
m_ScalingByTransforms.ForEach (x => x.localScale = Vector3.one * (10 * scale));
|
||||
m_ScalingByUIParticles.ForEach (x => x.scale = scale);
|
||||
}
|
||||
|
||||
public void SetUIParticleScale(float scale)
|
||||
{
|
||||
foreach(var uip in FindObjectsOfType<UIParticle>())
|
||||
{
|
||||
uip.scale = scale;
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadScene(string name)
|
||||
{
|
||||
SceneManager.LoadScene (name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user