release v2.2.0

pull/52/head
mob-sakai 2019-02-23 23:39:55 +09:00
commit 041ddf679a
30 changed files with 9387 additions and 45 deletions

View File

@ -1,13 +1,22 @@
# Changelog
## [v2.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.0) (2019-02-23)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.1...v2.2.0)
**Implemented enhancements:**
- Display warning when material does not support Mask [\#43](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/43)
- Support changing material property by AnimationClip [\#42](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/42)
**Fixed bugs:**
- UV Animation is not work. [\#41](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/41)
## [v2.1.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.1.1) (2019-02-15)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.0...v2.1.1)
**Fixed bugs:**
- UIParticle.Scale - Rendering Order Issue [\#39](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/39)
## [v2.1.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.1.0) (2019-02-07)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.0.0...v2.1.0)

View File

@ -55,6 +55,8 @@ Compares this "Baking mesh" approach with the conventional approach:
![](https://user-images.githubusercontent.com/12690315/49866926-6c22f500-fe4c-11e8-8393-d5a546e9e2d3.gif)
* Scaled gizmo
![](https://user-images.githubusercontent.com/12690315/50343861-f31e4e80-056b-11e9-8f60-8bd0a8ff7adb.gif)
* Animatable material property
![](https://user-images.githubusercontent.com/12690315/53286323-2d94a980-37b0-11e9-8afb-c4a207805ff2.gif)
@ -74,12 +76,13 @@ Find the manifest.json file in the Packages folder of your project and edit it t
```js
{
"dependencies": {
"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.1.0",
"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.0",
...
},
}
```
To update the package, change `#{version}` to the target version.
To update the package, change `#{version}` to the target version.
Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension).
#### Using .unitypackage file (for Unity 2018.2+)
@ -124,6 +127,21 @@ Select `Assets > Import Package > Custom Package` from the menu.
<br><br><br><br>
## Development Note
#### Animatable material property
![](https://user-images.githubusercontent.com/12690315/53286323-2d94a980-37b0-11e9-8afb-c4a207805ff2.gif)
Animation clips can change the material properties of the Renderer, such as ParticleSystemRenderer.
It uses MaterialPropertyBlock so it does not create new material instances.
Using material properties, you can change UV animation, scale and color etc.
Well, there is a component called CanvasRenderer.
It is used by all Graphic components for UI (Text, Image, Raw Image, etc.) including UIParticle.
However, It is **NOT** a Renderer.
Therefore, in UIParticle, changing ParticleSystemRenderer's MaterialPropertyBlock by animation clip is ignored.
To prevent this, Use "Animatable Material Property".
"Animatable Material Property" gets the necessary properties from ParticleSystemRenderer's MaterialPropertyBlock and sets them to the CanvasRenderer's material.

View File

@ -6,6 +6,7 @@ using System.Linq;
using UnityEditor.IMGUI.Controls;
using System;
using System.Reflection;
using ShaderPropertyType = Coffee.UIExtensions.UIParticle.AnimatableProperty.ShaderPropertyType;
namespace Coffee.UIExtensions
{
@ -13,6 +14,108 @@ namespace Coffee.UIExtensions
[CanEditMultipleObjects]
public class UIParticleEditor : GraphicEditor
{
class AnimatedPropertiesEditor
{
static readonly List<string> s_ActiveNames = new List<string> ();
static readonly System.Text.StringBuilder s_Sb = new System.Text.StringBuilder ();
public string name;
public ShaderPropertyType type;
static string CollectActiveNames (SerializedProperty sp, List<string> result)
{
result.Clear ();
for (int i = 0; i < sp.arraySize; i++)
{
result.Add (sp.GetArrayElementAtIndex (i).FindPropertyRelative ("m_Name").stringValue);
}
s_Sb.Length = 0;
if (result.Count == 0)
{
s_Sb.Append ("Nothing");
}
else
{
result.Aggregate (s_Sb, (a, b) => s_Sb.AppendFormat ("{0}, ", b));
s_Sb.Length -= 2;
}
return s_Sb.ToString ();
}
public static void DrawAnimatableProperties (SerializedProperty sp, Material mat)
{
if (!mat || !mat.shader)
return;
bool isClicked = false;
using (new EditorGUILayout.HorizontalScope (GUILayout.ExpandWidth (false)))
{
var r = EditorGUI.PrefixLabel (EditorGUILayout.GetControlRect (true), new GUIContent (sp.displayName, sp.tooltip));
isClicked = GUI.Button (r, CollectActiveNames (sp, s_ActiveNames), EditorStyles.popup);
}
if (isClicked)
{
GenericMenu gm = new GenericMenu ();
gm.AddItem (new GUIContent ("Nothing"), s_ActiveNames.Count == 0, () =>
{
sp.ClearArray ();
sp.serializedObject.ApplyModifiedProperties ();
});
for (int i = 0; i < sp.arraySize; i++)
{
var p = sp.GetArrayElementAtIndex (i);
var name = p.FindPropertyRelative ("m_Name").stringValue;
var type = (ShaderPropertyType)p.FindPropertyRelative ("m_Type").intValue;
AddMenu (gm, sp, new AnimatedPropertiesEditor () { name = name, type = type }, false);
}
for (int i = 0; i < ShaderUtil.GetPropertyCount (mat.shader); i++)
{
var pName = ShaderUtil.GetPropertyName (mat.shader, i);
var type = (ShaderPropertyType)ShaderUtil.GetPropertyType (mat.shader, i);
AddMenu (gm, sp, new AnimatedPropertiesEditor () { name = pName, type = type }, true);
if (type == ShaderPropertyType.Texture)
{
AddMenu (gm, sp, new AnimatedPropertiesEditor () { name = pName + "_ST", type = ShaderPropertyType.Vector }, true);
AddMenu (gm, sp, new AnimatedPropertiesEditor () { name = pName + "_HDR", type = ShaderPropertyType.Vector }, true);
AddMenu (gm, sp, new AnimatedPropertiesEditor () { name = pName + "_TexelSize", type = ShaderPropertyType.Vector }, true);
}
}
gm.ShowAsContext ();
}
}
public static void AddMenu (GenericMenu menu, SerializedProperty sp, AnimatedPropertiesEditor property, bool add)
{
if (add && s_ActiveNames.Contains (property.name))
return;
menu.AddItem (new GUIContent (string.Format ("{0} ({1})", property.name, property.type)), s_ActiveNames.Contains (property.name), () =>
{
var index = s_ActiveNames.IndexOf (property.name);
if (0 <= index)
{
sp.DeleteArrayElementAtIndex (index);
}
else
{
sp.InsertArrayElementAtIndex (sp.arraySize);
var p = sp.GetArrayElementAtIndex (sp.arraySize - 1);
p.FindPropertyRelative ("m_Name").stringValue = property.name;
p.FindPropertyRelative ("m_Type").intValue = (int)property.type;
}
sp.serializedObject.ApplyModifiedProperties ();
});
}
}
//################################
// Constant or Static Members.
//################################
@ -25,6 +128,15 @@ namespace Coffee.UIExtensions
static readonly Color s_ShapeGizmoThicknessTint = new Color (0.7f, 0.7f, 0.7f, 1.0f);
static Material s_Material;
static readonly List<string> s_MaskablePropertyNames = new List<string> ()
{
"_Stencil",
"_StencilComp",
"_StencilOp",
"_StencilWriteMask",
"_StencilReadMask",
"_ColorMask",
};
//################################
// Public/Protected Members.
@ -39,6 +151,7 @@ namespace Coffee.UIExtensions
_spTrailParticle = serializedObject.FindProperty ("m_TrailParticle");
_spScale = serializedObject.FindProperty ("m_Scale");
_spIgnoreParent = serializedObject.FindProperty ("m_IgnoreParent");
_spAnimatableProperties = serializedObject.FindProperty ("m_AnimatableProperties");
if (!s_Material)
{
@ -86,6 +199,9 @@ namespace Coffee.UIExtensions
EditorGUILayout.PropertyField (_spScale);
EditorGUI.EndDisabledGroup ();
// AnimatableProperties
AnimatedPropertiesEditor.DrawAnimatableProperties (_spAnimatableProperties, current.material);
current.GetComponentsInChildren<ParticleSystem> (true, s_ParticleSystems);
if (s_ParticleSystems.Any (x => x.GetComponent<UIParticle> () == null))
{
@ -104,9 +220,28 @@ namespace Coffee.UIExtensions
}
s_ParticleSystems.Clear ();
if (current.maskable && current.material && current.material.shader)
{
var mat = current.material;
var shader = mat.shader;
foreach (var propName in s_MaskablePropertyNames)
{
if (!mat.HasProperty (propName))
{
EditorGUILayout.HelpBox (string.Format("Shader {0} doesn't have '{1}' property. This graphic is not maskable.", shader.name, propName), MessageType.Warning);
break;
}
}
}
serializedObject.ApplyModifiedProperties ();
}
//################################
// Private Members.
//################################
@ -114,6 +249,7 @@ namespace Coffee.UIExtensions
SerializedProperty _spTrailParticle;
SerializedProperty _spScale;
SerializedProperty _spIgnoreParent;
SerializedProperty _spAnimatableProperties;
UIParticle [] _particles;
ArcHandle _arcHandle = new ArcHandle ();
BoxBoundsHandle _boxBoundsHandle = new BoxBoundsHandle ();

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Profiling;
using UnityEngine.UI;
using ShaderPropertyType = Coffee.UIExtensions.UIParticle.AnimatableProperty.ShaderPropertyType;
namespace Coffee.UIExtensions
@ -35,6 +36,42 @@ namespace Coffee.UIExtensions
[Tooltip ("Ignore parent scale")]
[SerializeField] bool m_IgnoreParent = false;
[Tooltip ("Animatable material properties. AnimationでParticleSystemのマテリアルプロパティを変更する場合、有効にしてください。")]
[SerializeField] AnimatableProperty[] m_AnimatableProperties = new AnimatableProperty[0];
static MaterialPropertyBlock s_Mpb;
[System.Serializable]
public class AnimatableProperty : ISerializationCallbackReceiver
{
public enum ShaderPropertyType
{
Color,
Vector,
Float,
Range,
Texture,
};
[SerializeField]
string m_Name;
[SerializeField]
ShaderPropertyType m_Type;
public int id { get; private set; }
public ShaderPropertyType type { get { return m_Type; } }
public void OnBeforeSerialize ()
{
}
public void OnAfterDeserialize ()
{
id = Shader.PropertyToID (m_Name);
}
}
//################################
// Public/Protected Members.
@ -57,9 +94,7 @@ namespace Coffee.UIExtensions
if (!tex && _renderer)
{
Profiler.BeginSample ("Check material");
var mat = m_IsTrail
? _renderer.trailMaterial
: _renderer.sharedMaterial;
var mat = material;
if (mat && mat.HasProperty (s_IdMainTex))
{
tex = mat.mainTexture;
@ -70,6 +105,35 @@ namespace Coffee.UIExtensions
}
}
public override Material material
{
get
{
return _renderer
? m_IsTrail
? _renderer.trailMaterial
: _renderer.sharedMaterial
: null;
}
set
{
if (!_renderer)
{
}
else if (m_IsTrail && _renderer.trailMaterial != value)
{
_renderer.trailMaterial = value;
SetMaterialDirty ();
}
else if (!m_IsTrail && _renderer.sharedMaterial != value)
{
_renderer.sharedMaterial = value;
SetMaterialDirty ();
}
}
}
/// <summary>
/// Particle effect scale.
/// </summary>
@ -117,7 +181,15 @@ namespace Coffee.UIExtensions
/// <param name="baseMaterial">Configured Material.</param>
public override Material GetModifiedMaterial (Material baseMaterial)
{
return base.GetModifiedMaterial (_renderer ? _renderer.sharedMaterial : baseMaterial);
Material mat = null;
if (!_renderer)
mat = baseMaterial;
else if (m_AnimatableProperties.Length == 0)
mat = _renderer.sharedMaterial;
else
mat = new Material (material);
return base.GetModifiedMaterial (mat);
}
/// <summary>
@ -129,6 +201,7 @@ namespace Coffee.UIExtensions
if (s_ActiveParticles.Count == 0)
{
Canvas.willRenderCanvases += UpdateMeshes;
s_Mpb = new MaterialPropertyBlock ();
}
s_ActiveParticles.Add (this);
@ -369,6 +442,10 @@ namespace Coffee.UIExtensions
Profiler.BeginSample ("Set mesh and texture to CanvasRenderer");
canvasRenderer.SetMesh (_mesh);
canvasRenderer.SetTexture (mainTexture);
// Copy the value from MaterialPropertyBlock to CanvasRenderer (#41)
UpdateAnimatableMaterialProperties ();
Profiler.EndSample ();
}
}
@ -427,5 +504,43 @@ namespace Coffee.UIExtensions
_parent._children.Add (this);
}
}
/// <summary>
/// Copy the value from MaterialPropertyBlock to CanvasRenderer (#41)
/// </summary>
void UpdateAnimatableMaterialProperties ()
{
#if UNITY_EDITOR
if (!Application.isPlaying)
return;
#endif
if (0 == m_AnimatableProperties.Length)
return;
_renderer.GetPropertyBlock (s_Mpb);
for (int i = 0; i < canvasRenderer.materialCount; i++)
{
var mat = canvasRenderer.GetMaterial (i);
foreach (var ap in m_AnimatableProperties)
{
switch (ap.type)
{
case ShaderPropertyType.Color:
mat.SetColor (ap.id, s_Mpb.GetColor (ap.id));
break;
case ShaderPropertyType.Vector:
mat.SetVector (ap.id, s_Mpb.GetVector (ap.id));
break;
case ShaderPropertyType.Float:
case ShaderPropertyType.Range:
mat.SetFloat (ap.id, s_Mpb.GetFloat (ap.id));
break;
case ShaderPropertyType.Texture:
mat.SetTexture (ap.id, s_Mpb.GetTexture (ap.id));
break;
}
}
}
}
}
}

View File

@ -77,7 +77,7 @@
v2f OUT;
OUT.worldPosition = IN.vertex;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.texcoord = IN.texcoord;
OUT.texcoord = TRANSFORM_TEX(IN.texcoord, _MainTex);
#ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
#endif

View File

@ -2,7 +2,7 @@
"name": "com.coffee.ui-particle",
"displayName": "UI Particle",
"description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.",
"version": "2.1.1",
"version": "2.2.0",
"unity": "2018.2",
"license": "MIT",
"repository": {

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f815d855ff969234888132ed7c171015
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,251 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UIParticle_Demo_Animatable
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.x
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.y
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.z
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: -0.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.w
path:
classID: 199
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 30
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 914802057
script: {fileID: 0}
typeID: 199
customType: 22
isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 109495689
script: {fileID: 0}
typeID: 199
customType: 22
isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 377931145
script: {fileID: 0}
typeID: 199
customType: 22
isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 646366601
script: {fileID: 0}
typeID: 199
customType: 22
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.x
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.y
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.z
path:
classID: 199
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: -0.3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: material._MainTex_ST.w
path:
classID: 199
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 69ad7869b9c72c04b8096c17f666bbaa
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,119 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UIParticle_Demo_Animatable
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107990299158400902}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101675994589164342
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102591848880857122}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8333333
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102093862037490004
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Play
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101675994589164342}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 69ad7869b9c72c04b8096c17f666bbaa, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102591848880857122
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107990299158400902
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102093862037490004}
m_Position: {x: 288, y: 48, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102591848880857122}
m_Position: {x: 288, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 48, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102591848880857122}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23dca587da071cd41ac3a7fc070bea5c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,95 @@
fileFormatVersion: 2
guid: cc4bae8d676c44e0faffd572cc7599a0
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: o_ring_00
100002: //RootNode
400000: o_ring_00
400002: //RootNode
2100000: lambert2
2300000: o_ring_00
3300000: o_ring_00
4300000: o_ring_00
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 1
hasPreviousCalculatedGlobalScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,85 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UIParticle_Demo_Animatable
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: e834c7963556c9b4cbad7f1bee63f597, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 63570eac008cb9a469a56188251c00c7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: e834c7963556c9b4cbad7f1bee63f597
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fd2938b6280d84e328d330be2aedd18f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 386ec701f53b9e1409c2448a9ac4194e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,9 +7,7 @@ namespace Coffee.UIExtensions.Demo
{
public class UIParticle_Demo : MonoBehaviour
{
[SerializeField] Sprite m_Sprite;
[SerializeField] ParticleSystem [] m_ParticleSystems;
[SerializeField] Mask [] m_Masks;
[SerializeField] List<Transform> m_ScalingByTransforms;
[SerializeField] List<UIParticle> m_ScalingByUIParticles;
@ -70,5 +68,44 @@ namespace Coffee.UIExtensions.Demo
{
SceneManager.LoadScene (name);
}
public void PlayAllParticleEffect ()
{
foreach (var animator in FindObjectsOfType<Animator> ())
{
animator.Play ("Play");
}
foreach (var particle in FindObjectsOfType<ParticleSystem> ())
{
particle.Play ();
}
}
public void SetWorldSpase (bool flag)
{
if (flag)
{
GetComponent<Canvas> ().renderMode = RenderMode.ScreenSpaceCamera;
GetComponent<Canvas> ().renderMode = RenderMode.WorldSpace;
transform.rotation = Quaternion.Euler (new Vector3 (0, 6, 0));
}
}
public void SetScreenSpase (bool flag)
{
if (flag)
{
GetComponent<Canvas> ().renderMode = RenderMode.ScreenSpaceCamera;
}
}
public void SetOverlay (bool flag)
{
if (flag)
{
GetComponent<Canvas> ().renderMode = RenderMode.ScreenSpaceOverlay;
}
}
}
}

View File

@ -743,6 +743,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &80064246
CanvasRenderer:
m_ObjectHideFlags: 0
@ -774,6 +775,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &80064248
CanvasRenderer:
m_ObjectHideFlags: 0
@ -805,6 +807,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &80064250
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3131,6 +3134,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &603288251
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3162,6 +3166,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &603288253
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3193,6 +3198,7 @@ MonoBehaviour:
m_IsTrail: 0
m_Scale: 22.50022
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &603288255
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3200,6 +3206,81 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 603288249}
m_CullTransparentMesh: 0
--- !u!1 &696783557
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 696783558}
- component: {fileID: 696783560}
- component: {fileID: 696783559}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &696783558
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 696783557}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1941349175}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &696783559
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 696783557}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Animatable Test
--- !u!222 &696783560
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 696783557}
m_CullTransparentMesh: 0
--- !u!1001 &710940348
Prefab:
m_ObjectHideFlags: 0
@ -4244,19 +4325,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eba3b7ce20b7f470a891c84def6be7e4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Sprite: {fileID: 0}
m_ParticleSystems:
- {fileID: 40867143}
- {fileID: 603288247}
- {fileID: 2045332483}
- {fileID: 932463053}
- {fileID: 892220340}
m_Masks:
- {fileID: 829344119}
- {fileID: 1990444707}
- {fileID: 1796369711}
- {fileID: 203308589}
- {fileID: 1916732546}
m_ScalingByTransforms:
- {fileID: 841459391}
- {fileID: 43509101}
@ -5087,7 +5161,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: << ParticleEffectForUGUI v2.0.0 >>
m_Text: << ParticleEffectForUGUI v2.2.0 >>
--- !u!222 &1359744117
CanvasRenderer:
m_ObjectHideFlags: 0
@ -5554,6 +5628,7 @@ MonoBehaviour:
m_IsTrail: 1
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &1464857226
CanvasRenderer:
m_ObjectHideFlags: 0
@ -6112,6 +6187,7 @@ MonoBehaviour:
m_IsTrail: 1
m_Scale: 1
m_IgnoreParent: 0
m_AnimatableProperties: []
--- !u!222 &1619513461
CanvasRenderer:
m_ObjectHideFlags: 0
@ -6887,6 +6963,7 @@ RectTransform:
- {fileID: 1626066441}
- {fileID: 335351181}
- {fileID: 1966030428}
- {fileID: 1941349175}
m_Father: {fileID: 1918337914}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -7338,6 +7415,149 @@ Prefab:
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 93be31a30fbb04a19ab014d2b7c8489e, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &1941349174
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1941349175}
- component: {fileID: 1941349179}
- component: {fileID: 1941349178}
- component: {fileID: 1941349177}
- component: {fileID: 1941349176}
m_Layer: 5
m_Name: Button (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1941349175
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1941349174}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9998866, y: 0.9998866, z: 0.9998866}
m_Children:
- {fileID: 696783558}
m_Father: {fileID: 1810222380}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 172.88, y: -122.2}
m_SizeDelta: {x: 122.76, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1941349176
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1941349174}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &1941349177
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1941349174}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1941349178}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 993972853}
m_MethodName: LoadScene
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: UIParticle_Demo_Animatable
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1941349178
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1941349174}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1941349179
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1941349174}
m_CullTransparentMesh: 0
--- !u!1 &1966030427
GameObject:
m_ObjectHideFlags: 0

View File

@ -79,6 +79,7 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -1,13 +1,22 @@
# Changelog
## [v2.2.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.2.0) (2019-02-23)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.1...v2.2.0)
**Implemented enhancements:**
- Display warning when material does not support Mask [\#43](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/43)
- Support changing material property by AnimationClip [\#42](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/42)
**Fixed bugs:**
- UV Animation is not work. [\#41](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/41)
## [v2.1.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.1.1) (2019-02-15)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.1.0...v2.1.1)
**Fixed bugs:**
- UIParticle.Scale - Rendering Order Issue [\#39](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/39)
## [v2.1.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v2.1.0) (2019-02-07)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v2.0.0...v2.1.0)

View File

@ -11,4 +11,7 @@ EditorBuildSettings:
- enabled: 1
path: Assets/UIParticle_Demo/UIParticle_Demo_ScaleTest.unity
guid: 51072f6aafc134e4bac206c56bc6876b
- enabled: 1
path: Assets/UIParticle_Demo/Animatable/UIParticle_Demo_Animatable.unity
guid: 386ec701f53b9e1409c2448a9ac4194e
m_configObjects: {}

View File

@ -17,6 +17,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 1
textureQuality: 1
anisotropicTextures: 0
@ -28,9 +29,16 @@ QualitySettings:
vSyncCount: 0
lodBias: 0.3
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 4
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Fast
@ -43,6 +51,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
textureQuality: 0
anisotropicTextures: 0
@ -54,9 +63,16 @@ QualitySettings:
vSyncCount: 0
lodBias: 0.4
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 16
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Simple
@ -69,6 +85,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
textureQuality: 0
anisotropicTextures: 1
@ -80,9 +97,16 @@ QualitySettings:
vSyncCount: 1
lodBias: 0.7
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 64
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Good
@ -95,6 +119,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 2
textureQuality: 0
anisotropicTextures: 1
@ -106,9 +131,16 @@ QualitySettings:
vSyncCount: 1
lodBias: 1
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 256
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Beautiful
@ -121,6 +153,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
textureQuality: 0
anisotropicTextures: 2
@ -132,9 +165,16 @@ QualitySettings:
vSyncCount: 1
lodBias: 1.5
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 1024
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Fantastic
@ -147,6 +187,7 @@ QualitySettings:
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
textureQuality: 0
anisotropicTextures: 2
@ -158,23 +199,15 @@ QualitySettings:
vSyncCount: 1
lodBias: 2
maximumLODLevel: 0
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
streamingMipmapsRenderersPerFrame: 512
streamingMipmapsMaxLevelReduction: 2
streamingMipmapsMaxFileIORequests: 1024
particleRaycastBudget: 4096
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 4
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2
Nintendo 3DS: 5
PS4: 5
PSM: 5
PSP2: 2
Samsung TV: 2
Standalone: 5
Tizen: 2
Web: 5
WebGL: 3
WiiU: 5
Windows Store Apps: 5
XboxOne: 5
iPhone: 2
tvOS: 5
m_PerPlatformDefaultQuality: {}

View File

@ -55,6 +55,8 @@ Compares this "Baking mesh" approach with the conventional approach:
![](https://user-images.githubusercontent.com/12690315/49866926-6c22f500-fe4c-11e8-8393-d5a546e9e2d3.gif)
* Scaled gizmo
![](https://user-images.githubusercontent.com/12690315/50343861-f31e4e80-056b-11e9-8f60-8bd0a8ff7adb.gif)
* Animatable material property
![](https://user-images.githubusercontent.com/12690315/53286323-2d94a980-37b0-11e9-8afb-c4a207805ff2.gif)
@ -74,12 +76,13 @@ Find the manifest.json file in the Packages folder of your project and edit it t
```js
{
"dependencies": {
"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.1.0",
"com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.2.0",
...
},
}
```
To update the package, change `#{version}` to the target version.
To update the package, change `#{version}` to the target version.
Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension).
#### Using .unitypackage file (for Unity 2018.2+)
@ -124,6 +127,21 @@ Select `Assets > Import Package > Custom Package` from the menu.
<br><br><br><br>
## Development Note
#### Animatable material property
![](https://user-images.githubusercontent.com/12690315/53286323-2d94a980-37b0-11e9-8afb-c4a207805ff2.gif)
Animation clips can change the material properties of the Renderer, such as ParticleSystemRenderer.
It uses MaterialPropertyBlock so it does not create new material instances.
Using material properties, you can change UV animation, scale and color etc.
Well, there is a component called CanvasRenderer.
It is used by all Graphic components for UI (Text, Image, Raw Image, etc.) including UIParticle.
However, It is **NOT** a Renderer.
Therefore, in UIParticle, changing ParticleSystemRenderer's MaterialPropertyBlock by animation clip is ignored.
To prevent this, Use "Animatable Material Property".
"Animatable Material Property" gets the necessary properties from ParticleSystemRenderer's MaterialPropertyBlock and sets them to the CanvasRenderer's material.

View File

@ -2,7 +2,7 @@
"name": "com.coffee.ui-particle",
"displayName": "UI Particle",
"description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.",
"version": "2.1.1",
"version": "2.2.0",
"unity": "2018.2",
"license": "MIT",
"repository": {