release v1.3.1

pull/33/head
mob-sakai 2018-12-24 12:30:56 +09:00
commit dd953cd4eb
28 changed files with 36796 additions and 37368 deletions

View File

@ -5,8 +5,7 @@ Material:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIAdditive m_Name: UIAdditive
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3} m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
m_ShaderKeywords: m_ShaderKeywords:
@ -80,5 +79,6 @@ Material:
- _UseUIAlphaClip: 0 - _UseUIAlphaClip: 0
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -5,8 +5,7 @@ Material:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIParticle_Demo_Fire m_Name: UIParticle_Demo_Fire
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3} m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
m_ShaderKeywords: m_ShaderKeywords:
@ -78,9 +77,9 @@ Material:
- _StencilReadMask: 255 - _StencilReadMask: 255
- _StencilWriteMask: 255 - _StencilWriteMask: 255
- _UVSec: 0 - _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1} - _TintColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -5,8 +5,7 @@ Material:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIParticle_Demo_FireExplosion m_Name: UIParticle_Demo_FireExplosion
m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _FADING_ON _REQUIRE_UV2 m_ShaderKeywords: _ALPHABLEND_ON _EMISSION _FADING_ON _REQUIRE_UV2

View File

@ -1,86 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIParticle_Demo_Fire_Additive
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
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: df33a97a787f8a64a82b59ee073e7cd7, 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
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _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,9 +0,0 @@
fileFormatVersion: 2
guid: 5a8a71c22a6f24028aeb0f5961cddeb4
timeCreated: 1494793998
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: d6b0ba590556a45cd8c5a92ee22ddf1c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 728f1c107bd0b49418a7e499b481b8da guid: 51072f6aafc134e4bac206c56bc6876b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

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

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 40d8f2504d16f42d7a0422e7397e5f86
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,8 +5,7 @@ Material:
serializedVersion: 6 serializedVersion: 6
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIParticle_Demo_Spread m_Name: UIParticle_Demo_Spread
m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3} m_Shader: {fileID: 4800000, guid: ecfa8f5732b504ef98fba10aa18d0326, type: 3}
m_ShaderKeywords: m_ShaderKeywords:
@ -78,7 +77,6 @@ Material:
- _StencilReadMask: 255 - _StencilReadMask: 255
- _StencilWriteMask: 255 - _StencilWriteMask: 255
- _UVSec: 0 - _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}

View File

@ -1,86 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIParticle_Demo_Spread_Additive
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
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: 0}
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
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _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,9 +0,0 @@
fileFormatVersion: 2
guid: 66c6abb38948941d8b179d7b99d3270f
timeCreated: 1494793998
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -140,9 +140,9 @@ namespace Coffee.UIExtensions
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
foreach (UIParticle current in _particles) foreach (UIParticle uip in _particles)
{ {
ParticleSystem ps = current.GetComponent<ParticleSystem> (); ParticleSystem ps = uip.cachedParticleSystem;
if (!ps) if (!ps)
{ {
continue; continue;
@ -174,13 +174,13 @@ namespace Coffee.UIExtensions
transformMatrix *= emitterMatrix; transformMatrix *= emitterMatrix;
Handles.matrix = transformMatrix; Handles.matrix = transformMatrix;
if(current.canvas.renderMode == RenderMode.ScreenSpaceOverlay || ps.main.scalingMode == ParticleSystemScalingMode.Hierarchy) if(uip.canvas.renderMode == RenderMode.ScreenSpaceOverlay || ps.main.scalingMode == ParticleSystemScalingMode.Hierarchy)
{ {
Handles.matrix = Handles.matrix * Matrix4x4.Scale (Vector3.one * current.scale); Handles.matrix = Handles.matrix * Matrix4x4.Scale (Vector3.one * uip.scale);
} }
else else
{ {
Handles.matrix = Handles.matrix * Matrix4x4.Scale (current.canvas.rootCanvas.transform.localScale * current.scale); Handles.matrix = Handles.matrix * Matrix4x4.Scale (uip.canvas.rootCanvas.transform.localScale * uip.scale);
} }
if (type == ParticleSystemShapeType.Sphere) if (type == ParticleSystemShapeType.Sphere)
@ -189,7 +189,7 @@ namespace Coffee.UIExtensions
Handles.color *= s_ShapeGizmoThicknessTint; Handles.color *= s_ShapeGizmoThicknessTint;
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
//float radiusThickness = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), false, shapeModule.arc); //float radiusThickness = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), false, shapeModule.arc);
float radiusThickness = Call<float> (typeof (Handles), "DoSimpleRadiusHandle", Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), false, shapeModule.arc); float radiusThickness = Handles.RadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), false);
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Sphere Thickness Handle Change"); Undo.RecordObject (ps, "Sphere Thickness Handle Change");
@ -200,7 +200,7 @@ namespace Coffee.UIExtensions
Handles.color = s_GizmoColor; Handles.color = s_GizmoColor;
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
//float radius = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, false, shapeModule.arc); //float radius = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, false, shapeModule.arc);
float radius = Call<float> (typeof (Handles), "DoSimpleRadiusHandle", Quaternion.identity, Vector3.zero, shapeModule.radius, false, shapeModule.arc); float radius = Handles.RadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, false);
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Sphere Handle Change"); Undo.RecordObject (ps, "Sphere Handle Change");
@ -256,7 +256,8 @@ namespace Coffee.UIExtensions
Handles.color *= s_ShapeGizmoThicknessTint; Handles.color *= s_ShapeGizmoThicknessTint;
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
//float radiusThickness = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), true, shapeModule.arc); //float radiusThickness = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), true, shapeModule.arc);
float radiusThickness = Call<float> (typeof (Handles), "DoSimpleRadiusHandle", Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), true, shapeModule.arc); //float radiusThickness = Call<float> (typeof (Handles), "DoSimpleRadiusHandle", Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), true, shapeModule.arc);
float radiusThickness = Handles.RadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius * (1.0f - shapeModule.radiusThickness), true);
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Hemisphere Thickness Handle Change"); Undo.RecordObject (ps, "Hemisphere Thickness Handle Change");
@ -267,7 +268,7 @@ namespace Coffee.UIExtensions
Handles.color = s_GizmoColor; Handles.color = s_GizmoColor;
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
//float radius = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, true, shapeModule.arc); //float radius = Handles.DoSimpleRadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, true, shapeModule.arc);
float radius = Call<float> (typeof (Handles), "DoSimpleRadiusHandle", Quaternion.identity, Vector3.zero, shapeModule.radius, true, shapeModule.arc); float radius = Handles.RadiusHandle (Quaternion.identity, Vector3.zero, shapeModule.radius, true);
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Hemisphere Handle Change"); Undo.RecordObject (ps, "Hemisphere Handle Change");
@ -286,7 +287,11 @@ namespace Coffee.UIExtensions
float angleThickness = Mathf.Lerp (shapeModule.angle, 0.0f, shapeModule.radiusThickness); float angleThickness = Mathf.Lerp (shapeModule.angle, 0.0f, shapeModule.radiusThickness);
Vector3 radiusThicknessAngleRange = new Vector3 (shapeModule.radius * (1.0f - shapeModule.radiusThickness), angleThickness, mainModule.startSpeedMultiplier); Vector3 radiusThicknessAngleRange = new Vector3 (shapeModule.radius * (1.0f - shapeModule.radiusThickness), angleThickness, mainModule.startSpeedMultiplier);
//radiusThicknessAngleRange = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusThicknessAngleRange, Handles.ConeHandles.Radius); //radiusThicknessAngleRange = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusThicknessAngleRange, Handles.ConeHandles.Radius);
#if UNITY_2018_3_OR_NEWER
radiusThicknessAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleRange, 1); radiusThicknessAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleRange, 1);
#else
radiusThicknessAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleRange);
#endif
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Cone Thickness Handle Change"); Undo.RecordObject (ps, "Cone Thickness Handle Change");
@ -298,7 +303,11 @@ namespace Coffee.UIExtensions
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
Vector3 radiusAngleRange = new Vector3 (shapeModule.radius, shapeModule.angle, mainModule.startSpeedMultiplier); Vector3 radiusAngleRange = new Vector3 (shapeModule.radius, shapeModule.angle, mainModule.startSpeedMultiplier);
//radiusAngleRange = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusAngleRange); //radiusAngleRange = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusAngleRange);
#if UNITY_2018_3_OR_NEWER
radiusAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleRange, 7); radiusAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleRange, 7);
#else
radiusAngleRange = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleRange);
#endif
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Cone Handle Change"); Undo.RecordObject (ps, "Cone Handle Change");
@ -319,7 +328,11 @@ namespace Coffee.UIExtensions
float angleThickness = Mathf.Lerp (shapeModule.angle, 0.0f, shapeModule.radiusThickness); float angleThickness = Mathf.Lerp (shapeModule.angle, 0.0f, shapeModule.radiusThickness);
Vector3 radiusThicknessAngleLength = new Vector3 (shapeModule.radius * (1.0f - shapeModule.radiusThickness), angleThickness, shapeModule.length); Vector3 radiusThicknessAngleLength = new Vector3 (shapeModule.radius * (1.0f - shapeModule.radiusThickness), angleThickness, shapeModule.length);
//radiusThicknessAngleLength = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusThicknessAngleLength, Handles.ConeHandles.Radius); //radiusThicknessAngleLength = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusThicknessAngleLength, Handles.ConeHandles.Radius);
#if UNITY_2018_3_OR_NEWER
radiusThicknessAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleLength, 1); radiusThicknessAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleLength, 1);
#else
radiusThicknessAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusThicknessAngleLength);
#endif
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Cone Volume Thickness Handle Change"); Undo.RecordObject (ps, "Cone Volume Thickness Handle Change");
@ -331,7 +344,11 @@ namespace Coffee.UIExtensions
EditorGUI.BeginChangeCheck (); EditorGUI.BeginChangeCheck ();
Vector3 radiusAngleLength = new Vector3 (shapeModule.radius, shapeModule.angle, shapeModule.length); Vector3 radiusAngleLength = new Vector3 (shapeModule.radius, shapeModule.angle, shapeModule.length);
//radiusAngleLength = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusAngleLength); //radiusAngleLength = Handles.ConeFrustrumHandle (Quaternion.identity, Vector3.zero, radiusAngleLength);
#if UNITY_2018_3_OR_NEWER
radiusAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleLength, 7); radiusAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleLength, 7);
#else
radiusAngleLength = Call<Vector3> (typeof (Handles), "ConeFrustrumHandle", Quaternion.identity, Vector3.zero, radiusAngleLength);
#endif
if (EditorGUI.EndChangeCheck ()) if (EditorGUI.EndChangeCheck ())
{ {
Undo.RecordObject (ps, "Cone Volume Handle Change"); Undo.RecordObject (ps, "Cone Volume Handle Change");

View File

@ -1,110 +1,101 @@
Shader "UI/Additive" Shader "UI/Additive"
{ {
Properties Properties
{ {
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1) _Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_StencilComp ("Stencil Comparison", Float) = 8 _ColorMask ("Color Mask", Float) = 15
_Stencil ("Stencil ID", Float) = 0 _ClipRect ("Clip Rect", Vector) = (-32767, -32767, 32767, 32767)
_StencilOp ("Stencil Operation", Float) = 0 }
_StencilWriteMask ("Stencil Write Mask", Float) = 255
_StencilReadMask ("Stencil Read Mask", Float) = 255
_ColorMask ("Color Mask", Float) = 15 SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil
{
Ref [_Stencil]
Comp [_StencilComp]
Pass [_StencilOp]
ReadMask [_StencilReadMask]
WriteMask [_StencilWriteMask]
}
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 Cull Off
} Lighting Off
ZWrite Off
ZTest [unity_GUIZTestMode]
Fog { Mode Off }
Blend One One
SubShader ColorMask [_ColorMask]
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
"CanUseSpriteAtlas"="True"
}
Stencil Pass
{ {
Ref [_Stencil] CGPROGRAM
Comp [_StencilComp] #pragma vertex vert
Pass [_StencilOp] #pragma fragment frag
ReadMask [_StencilReadMask] #include "UnityCG.cginc"
WriteMask [_StencilWriteMask] #include "UnityUI.cginc"
}
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
Cull Off struct v2f
Lighting Off {
ZWrite Off float4 vertex : SV_POSITION;
ZTest [unity_GUIZTestMode] fixed4 color : COLOR;
Blend SrcAlpha One half2 texcoord : TEXCOORD0;
ColorMask [_ColorMask] float4 worldPosition : TEXCOORD1;
};
fixed4 _Color;
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _ClipRect;
Pass v2f vert(appdata_t IN)
{ {
Name "Default" v2f OUT;
CGPROGRAM OUT.worldPosition = IN.vertex;
#pragma vertex vert OUT.vertex = UnityObjectToClipPos(IN.vertex);
#pragma fragment frag OUT.texcoord = IN.texcoord;
#pragma target 2.0 #ifdef UNITY_HALF_TEXEL_OFFSET
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
#endif
OUT.color = IN.color * _Color;
return OUT;
}
#include "UnityCG.cginc" fixed4 frag(v2f IN) : SV_Target
#include "UnityUI.cginc" {
half4 color = tex2D(_MainTex, IN.texcoord) * IN.color;
#pragma multi_compile __ UNITY_UI_ALPHACLIP color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
color.rgb *= color.a;
struct appdata_t #ifdef UNITY_UI_ALPHACLIP
{ clip (color.a - 0.01);
float4 vertex : POSITION; #endif
float4 color : COLOR; return color;
float2 texcoord : TEXCOORD0; }
UNITY_VERTEX_INPUT_INSTANCE_ID ENDCG
}; }
}
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
sampler2D _MainTex;
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float4 _MainTex_ST;
v2f vert(appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = v.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
OUT.color = v.color * _Color;
return OUT;
}
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
} }

View File

@ -44,10 +44,10 @@ namespace Coffee.UIExtensions
get get
{ {
Texture tex = null; Texture tex = null;
if (!m_IsTrail && particleSystem) if (!m_IsTrail && cachedParticleSystem)
{ {
Profiler.BeginSample ("Check TextureSheetAnimation module"); Profiler.BeginSample ("Check TextureSheetAnimation module");
var textureSheet = particleSystem.textureSheetAnimation; var textureSheet = cachedParticleSystem.textureSheetAnimation;
if (textureSheet.enabled && textureSheet.mode == ParticleSystemAnimationMode.Sprites && 0 < textureSheet.spriteCount) if (textureSheet.enabled && textureSheet.mode == ParticleSystemAnimationMode.Sprites && 0 < textureSheet.spriteCount)
{ {
tex = textureSheet.GetSprite (0).texture; tex = textureSheet.GetSprite (0).texture;
@ -110,7 +110,7 @@ namespace Coffee.UIExtensions
/// <summary> /// <summary>
/// ParticleSystem. /// ParticleSystem.
/// </summary> /// </summary>
new public ParticleSystem particleSystem { get { return m_ParticleSystem ? m_ParticleSystem : (m_ParticleSystem = GetComponent<ParticleSystem> ()); } } public ParticleSystem cachedParticleSystem { get { return m_ParticleSystem ? m_ParticleSystem : (m_ParticleSystem = GetComponent<ParticleSystem> ()); } }
/// <summary> /// <summary>
/// Perform material modification in this function. /// Perform material modification in this function.
@ -142,7 +142,7 @@ namespace Coffee.UIExtensions
} }
s_TempRelatables.Clear (); s_TempRelatables.Clear ();
_renderer = particleSystem ? particleSystem.GetComponent<ParticleSystemRenderer> () : null; _renderer = cachedParticleSystem ? cachedParticleSystem.GetComponent<ParticleSystemRenderer> () : null;
// Create objects. // Create objects.
_mesh = new Mesh (); _mesh = new Mesh ();

View File

@ -1,5 +1,14 @@
# Changelog # Changelog
## [v1.3.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v1.3.1) (2018-12-24)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v1.3.0...v1.3.1)
**Fixed bugs:**
- OnSceneGUI has errors in Unity 2018.2 [\#27](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/27)
- Demo scene crashes in Unity 2018.2 [\#26](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/26)
## [v1.3.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v1.3.0) (2018-12-21) ## [v1.3.0](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v1.3.0) (2018-12-21)
[Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v1.2.1...v1.3.0) [Full Changelog](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v1.2.1...v1.3.0)
@ -9,8 +18,8 @@ With Gizmo you can control the scaled Shape.
**Fixed bugs:** **Fixed bugs:**
- In overlay, particle size is too small [\#23](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/23)
- Assertion failed on expression: 'IsNormalized\(normal, 0.001f\)' [\#22](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/22) - Assertion failed on expression: 'IsNormalized\(normal, 0.001f\)' [\#22](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/22)
- In overlay, particle size is too small [\#23](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/23)
- UIParticle.Scale does not affect the gizmo of shape module [\#21](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/21) - UIParticle.Scale does not affect the gizmo of shape module [\#21](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/21)
## [v1.2.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v1.2.1) (2018-12-13) ## [v1.2.1](https://github.com/mob-sakai/ParticleEffectForUGUI/tree/v1.2.1) (2018-12-13)

View File

@ -1,11 +1,10 @@
{ {
"dependencies": { "dependencies": {
"com.unity.ads": "2.3.1", "com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.2", "com.unity.analytics": "2.0.16",
"com.unity.collab-proxy": "1.2.15", "com.unity.package-manager-ui": "1.9.9",
"com.unity.package-manager-ui": "2.0.3", "com.unity.purchasing": "2.0.1",
"com.unity.purchasing": "2.0.3", "com.unity.textmeshpro": "1.2.1",
"com.unity.textmeshpro": "1.3.0",
"com.unity.modules.ai": "1.0.0", "com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0", "com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.assetbundle": "1.0.0",

View File

@ -10,8 +10,5 @@ EditorBuildSettings:
guid: 1fc4d0f41c2bd3745b97b439cca95c22 guid: 1fc4d0f41c2bd3745b97b439cca95c22
- enabled: 1 - enabled: 1
path: Assets/Coffee/UIExtensions/UIParticle/Demo/UIParticle_Demo_ScaleTest.unity path: Assets/Coffee/UIExtensions/UIParticle/Demo/UIParticle_Demo_ScaleTest.unity
guid: 728f1c107bd0b49418a7e499b481b8da guid: 51072f6aafc134e4bac206c56bc6876b
- enabled: 1
path: Assets/Coffee/UIExtensions/UIParticle/Demo/UIParticle_Demo_ScaleTest2.unity
guid: 712b3f963876343cebf8429fee2f2b57
m_configObjects: {} m_configObjects: {}

View File

@ -1 +1 @@
m_EditorVersion: 2018.3.0f1 m_EditorVersion: 2018.2.14f1

View File

@ -1,11 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!937362698 &1
VFXManager:
m_ObjectHideFlags: 0
m_IndirectShader: {fileID: 0}
m_CopyBufferShader: {fileID: 0}
m_SortShader: {fileID: 0}
m_RenderPipeSettingsPath:
m_FixedTimeStep: 0.016666668
m_MaxDeltaTime: 0.05

View File

@ -1,6 +1,6 @@
{ {
"name": "ParticleEffectForUGUI", "name": "ParticleEffectForUGUI",
"version": "1.3.0", "version": "1.3.1",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/mob-sakai/ParticleEffectForUGUI.git" "url": "git+https://github.com/mob-sakai/ParticleEffectForUGUI.git"