Skip to content

Commit

Permalink
release v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Sakai committed May 23, 2018
2 parents c2cd330 + 0b37bfe commit de85482
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 30 deletions.
Binary file modified Assets/ShinyEffectForUGUI/Demo/Demo - ShinyEffectForUGUI.unity
Binary file not shown.
Binary file modified Assets/ShinyEffectForUGUI/Demo/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion Assets/ShinyEffectForUGUI/ShinyEffectForUGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ namespace Coffee.UIExtensions
/// </summary>
[ExecuteInEditMode]
[DisallowMultipleComponent]
public class ShinyEffectForUGUI : BaseMeshEffect, ISerializationCallbackReceiver
public class ShinyEffectForUGUI : BaseMeshEffect
#if UNITY_EDITOR
, ISerializationCallbackReceiver
#endif
{
//################################
// Constant or Static Members.
Expand Down Expand Up @@ -92,6 +95,7 @@ protected override void OnDisable()
base.OnDisable();
}

#if UNITY_EDITOR
public void OnBeforeSerialize()
{
}
Expand Down Expand Up @@ -124,6 +128,7 @@ public static Material GetMaterial(string shaderName)
.OfType<Material>()
.FirstOrDefault(x => x.name == name);
}
#endif

/// <summary>
/// Modifies the mesh.
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Binary file modified ProjectSettings/AudioManager.asset
Binary file not shown.
Binary file modified ProjectSettings/ClusterInputManager.asset
Binary file not shown.
Binary file modified ProjectSettings/DynamicsManager.asset
Binary file not shown.
Binary file modified ProjectSettings/EditorBuildSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/EditorSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/InputManager.asset
Binary file not shown.
Binary file modified ProjectSettings/NavMeshAreas.asset
Binary file not shown.
Binary file modified ProjectSettings/NetworkManager.asset
Binary file not shown.
Binary file modified ProjectSettings/Physics2DSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/ProjectSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/QualitySettings.asset
Binary file not shown.
Binary file modified ProjectSettings/TagManager.asset
Binary file not shown.
Binary file modified ProjectSettings/TimeManager.asset
Binary file not shown.
Binary file modified ProjectSettings/UnityConnectSettings.asset
Binary file not shown.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

<br><br>
##### 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



<br><br><br><br>
## 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/)



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
49 changes: 36 additions & 13 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,58 +1,81 @@
#!/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".
# 3. Commit package.json and CHANGELOG.md.
# 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"

0 comments on commit de85482

Please sign in to comment.