Update demo
parent
56d949e028
commit
bd058b29e1
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -5,7 +5,8 @@ Material:
|
|||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIParticle_Demo_Fire
|
||||
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
|
||||
m_ShaderKeywords:
|
||||
|
@ -77,6 +78,7 @@ Material:
|
|||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d6b0ba590556a45cd8c5a92ee22ddf1c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 728f1c107bd0b49418a7e499b481b8da
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -5,7 +5,8 @@ Material:
|
|||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIParticle_Demo_Spread
|
||||
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
|
||||
m_ShaderKeywords:
|
||||
|
@ -77,6 +78,7 @@ Material:
|
|||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
|
|
@ -5,7 +5,8 @@ Material:
|
|||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIAdditive
|
||||
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
|
||||
m_ShaderKeywords:
|
||||
|
|
Loading…
Reference in New Issue