diff --git a/Assets/ShinyEffectForUGUI/Demo/Demo - ShinyEffectForUGUI.unity b/Assets/ShinyEffectForUGUI/Demo/Demo - ShinyEffectForUGUI.unity index 74cf752..7116435 100644 Binary files a/Assets/ShinyEffectForUGUI/Demo/Demo - ShinyEffectForUGUI.unity and b/Assets/ShinyEffectForUGUI/Demo/Demo - ShinyEffectForUGUI.unity differ diff --git a/Assets/ShinyEffectForUGUI/Demo/bell.png b/Assets/ShinyEffectForUGUI/Demo/bell.png index 34d7af6..3a33bdd 100644 Binary files a/Assets/ShinyEffectForUGUI/Demo/bell.png and b/Assets/ShinyEffectForUGUI/Demo/bell.png differ diff --git a/Assets/ShinyEffectForUGUI/ShinyEffectForUGUI.cs b/Assets/ShinyEffectForUGUI/ShinyEffectForUGUI.cs index c53c056..c8bd793 100644 --- a/Assets/ShinyEffectForUGUI/ShinyEffectForUGUI.cs +++ b/Assets/ShinyEffectForUGUI/ShinyEffectForUGUI.cs @@ -16,7 +16,10 @@ namespace Coffee.UIExtensions /// [ExecuteInEditMode] [DisallowMultipleComponent] - public class ShinyEffectForUGUI : BaseMeshEffect, ISerializationCallbackReceiver + public class ShinyEffectForUGUI : BaseMeshEffect +#if UNITY_EDITOR + , ISerializationCallbackReceiver +#endif { //################################ // Constant or Static Members. @@ -92,6 +95,7 @@ protected override void OnDisable() base.OnDisable(); } +#if UNITY_EDITOR public void OnBeforeSerialize() { } @@ -124,6 +128,7 @@ public static Material GetMaterial(string shaderName) .OfType() .FirstOrDefault(x => x.name == name); } +#endif /// /// Modifies the mesh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b1eca..a82ecae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [v0.3.1](https://github.com/mob-sakai/ShinyEffectForUGUI/tree/v0.3.1) (2018-05-23) + +[Full Changelog](https://github.com/mob-sakai/ShinyEffectForUGUI/compare/v0.3.0...v0.3.1) + +**Implemented enhancements:** + +- Update readme & demo [\#10](https://github.com/mob-sakai/ShinyEffectForUGUI/issues/10) + +**Fixed bugs:** + +- Compile error has ocurred in build [\#11](https://github.com/mob-sakai/ShinyEffectForUGUI/issues/11) + ## [v0.3.0](https://github.com/mob-sakai/ShinyEffectForUGUI/tree/v0.3.0) (2018-04-09) [Full Changelog](https://github.com/mob-sakai/ShinyEffectForUGUI/compare/v0.2.0...v0.3.0) diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset index 553e899..2c4f5a1 100644 Binary files a/ProjectSettings/AudioManager.asset and b/ProjectSettings/AudioManager.asset differ diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset index a8e88bc..e7886b2 100644 Binary files a/ProjectSettings/ClusterInputManager.asset and b/ProjectSettings/ClusterInputManager.asset differ diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset index fab4ffa..6be6910 100644 Binary files a/ProjectSettings/DynamicsManager.asset and b/ProjectSettings/DynamicsManager.asset differ diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 5b5bc35..1202b91 100644 Binary files a/ProjectSettings/EditorBuildSettings.asset and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset index 864deae..7dff13c 100644 Binary files a/ProjectSettings/EditorSettings.asset and b/ProjectSettings/EditorSettings.asset differ diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 0e25902..0502153 100644 Binary files a/ProjectSettings/GraphicsSettings.asset and b/ProjectSettings/GraphicsSettings.asset differ diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index ca0d8c7..17c8f53 100644 Binary files a/ProjectSettings/InputManager.asset and b/ProjectSettings/InputManager.asset differ diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset index 06e72af..3a99a5a 100644 Binary files a/ProjectSettings/NavMeshAreas.asset and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset index d9769c4..5dc6a83 100644 Binary files a/ProjectSettings/NetworkManager.asset and b/ProjectSettings/NetworkManager.asset differ diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index 570b3f9..dd4738c 100644 Binary files a/ProjectSettings/Physics2DSettings.asset and b/ProjectSettings/Physics2DSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index aef44cc..534a9ff 100644 Binary files a/ProjectSettings/ProjectSettings.asset and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index adfe6fb..0d9af3e 100644 Binary files a/ProjectSettings/QualitySettings.asset and b/ProjectSettings/QualitySettings.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 4d6f864..1c92a78 100644 Binary files a/ProjectSettings/TagManager.asset and b/ProjectSettings/TagManager.asset differ diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset index fe329fb..558a017 100644 Binary files a/ProjectSettings/TimeManager.asset and b/ProjectSettings/TimeManager.asset differ diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset index b48df2d..2943e44 100644 Binary files a/ProjectSettings/UnityConnectSettings.asset and b/ProjectSettings/UnityConnectSettings.asset differ diff --git a/README.md b/README.md index 4d1ae5c..9d4728a 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ ShinyEffectForUGUI Shiny effect without Mask commponent. Since useless draw calls are suppressed, performance is good! -![image](https://user-images.githubusercontent.com/12690315/38797629-10a22922-419a-11e8-8b68-50be7f8856a5.png) -![4 -09-2018 22-45-47](https://user-images.githubusercontent.com/12690315/38501362-c56e3768-3c47-11e8-9ec1-50343d8b83ad.gif) +![image](https://user-images.githubusercontent.com/12690315/40420283-e22f7928-5ec2-11e8-903e-392c2b77f765.png) [![](https://img.shields.io/github/release/mob-sakai/ShinyEffectForUGUI.svg?label=latest%20version)](https://github.com/mob-sakai/ShinyEffectForUGUI/release) [![](https://img.shields.io/github/release-date/mob-sakai/ShinyEffectForUGUI.svg)](https://github.com/mob-sakai/ShinyEffectForUGUI/releases) @@ -28,28 +27,35 @@ Since useless draw calls are suppressed, performance is good! ShinyEffectForUGUI applies _shiny-effect_ to uGUI element (Image, RawImage, Text, etc...) **WITHOUT Mask component** . This will suppress extra draw calls and improve performance. -![image](https://user-images.githubusercontent.com/12690315/38498655-16f9d766-3c40-11e8-8e47-4718d531c948.png) +![compare](https://user-images.githubusercontent.com/12690315/40418786-39ad8b04-5ebe-11e8-91b9-2246a3d08a8c.gif) - -* Without-mask method - * Be applied shiny effect by shader - * 1 draw dall - * Will be batched as possible * With-mask method * For example: ShineEffect from [unity-ui-extensions](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions) - * Graphic + Mask + ShineEffect (masked) + * 3 GameObject: Graphic + Mask + ShineEffect (masked) * ![image](https://user-images.githubusercontent.com/12690315/38498601-ec56963e-3c3f-11e8-9eb4-4723389032f2.png) - * At least 3 draw calls, **for each** ui elements with shiny effect - * Stencil on - * Draw graphic - * Stensil off - * Artifacts on the edges + * At least 3 draw calls(1:Stencil on, 2:Draw graphic, 3:Stensil off), **FOR EACH** ui elements with shiny effect + * **Artifacts on the edges!** + +* **Proposal:** Without-mask method + * shader applies shiny effect + * 1 draw dall + * Will be batched as possible + +

+##### Features + +* No Mask component +* Easy to control in inspector +![inspector](https://user-images.githubusercontent.com/12690315/40419715-25109b20-5ec1-11e8-8980-26e4a415b152.gif) +* Supports AnimationClip +* Will be batched as possible +



## Demo -![4 -09-2018 23-15-12](https://user-images.githubusercontent.com/12690315/38503024-f1055fd8-3c4b-11e8-9065-841c75728498.gif) +[WebGL Demo](http://mob-sakai.github.io/ShinyEffectForUGUI/) diff --git a/package.json b/package.json index 4147272..3f6af26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ShinyEffectForUGUI", - "version": "0.3.0", + "version": "0.3.1", "repository": { "type": "git", "url": "git+https://github.com/mob-sakai/ShinyEffectForUGUI.git" diff --git a/release.sh b/release.sh index 99a1507..b95ea83 100755 --- a/release.sh +++ b/release.sh @@ -1,5 +1,8 @@ #!/bin/bash -e +# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc): +# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»" + # Release the project with the following steps: # 1. Update the release version in package.json. # 2. Update "CHANGELOG.md" using "github_changelog_generator-1.15.0.pre.rc". @@ -7,52 +10,72 @@ # 4. Merge into master branch. # 5. Export unitypackage. # 6. Release using "gh-release-3.2.0". (Upload unitypackage) -UNITY_PATH=/Applications/Unity5.5.0p4/Unity5.5.0p4.app/Contents/MacOS/Unity -# input version +# input release version +echo -e "\n>> Start Github Release:" PACKAGE_NAME=`node -pe 'require("./package.json").name'` -echo Github Release: $PACKAGE_NAME -read -p "[? release version (for example: 1.0.0): " RELEASE_VERSION +echo -e ">> Package name: ${PACKAGE_NAME}" +CURRENT_VERSION=`grep -o -e "\"version\".*$" package.json | sed -e "s/\"version\": \"\(.*\)\".*$/\1/"` +read -p "[? release version (for current: ${CURRENT_VERSION}): " RELEASE_VERSION [ -z "$RELEASE_VERSION" ] && exit -# update version +# update version in package.json +echo -e "\n>> Update version... package.json" git checkout -B release develop sed -i -e "s/\"version\": \(.*\)/\"version\": \"${RELEASE_VERSION}\",/g" package.json +# check unity editor +UNITY_VER=`sed -e "s/m_EditorVersion: \(.*\)/\1/g" ProjectSettings/ProjectVersion.txt` +UNITY_EDITOR="/Applications/Unity/Hub/Editor/${UNITY_VER}/Unity.app/Contents/MacOS/Unity" +echo -e "\n>> Check unity editor... ${UNITY_VER} (${UNITY_EDITOR})" +"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`" +echo -e ">> OK" + # generate change log +CHANGELOG_GENERATOR_ARG=`grep -o -e ".*git\"$" package.json | sed -e "s/^.*\/\([^\/]*\)\/\([^\/]*\).git.*$/--user \1 --project \2/"` +echo -e "\n>> Generate change log... ${CHANGELOG_GENERATOR_ARG}" TAG=v$RELEASE_VERSION git tag $TAG git push --tags -github_changelog_generator +github_changelog_generator ${CHANGELOG_GENERATOR_ARG} git tag -d $TAG git push --delete origin $TAG - git diff -- CHANGELOG.md -read -p "[? continue? (y/N):" yn +read -p "[? is the change log correct? (y/N):" yn case "$yn" in [yY]*) ;; *) exit ;; esac -# commit files +# commit release files +echo -e "\n>> Commit release files..." git add CHANGELOG.md -f git add package.json -f git commit -m "update change log" # merge and push +echo -e "\n>> Merge and push..." git checkout master git merge --no-ff release -m "release $TAG" git branch -D release git push origin master +git checkout develop +git merge --ff master +git push origin develop -# export .unitypackage and release on Github +# export unitypackage PACKAGE_SRC=`node -pe 'require("./package.json").src'` -$UNITY_PATH -quit -batchmode -projectPath "`pwd`" -exportpackage $PACKAGE_SRC $PACKAGE_NAME.unitypackage -gh-release --draft --assets $PACKAGE_NAME.unitypackage +echo -e "\n>> Export unitypackage... ${PACKAGE_SRC}" +"$UNITY_EDITOR" -quit -batchmode -projectPath "`pwd`" -exportpackage "$PACKAGE_SRC" "$PACKAGE_NAME.unitypackage" +echo -e ">> OK" + + +# upload unitypackage and release on Github +gh-release --assets "$PACKAGE_NAME.unitypackage" -echo "\n\n$PACKAGE_NAME v$RELEASE_VERSION has been successfully released!\n" +echo -e "\n\n>> $PACKAGE_NAME v$RELEASE_VERSION has been successfully released!\n"