Compare commits

..

No commits in common. "fe4fcc5ddd119998d8fe2540d5445a69e6650b1c" and "1a748f19d072a83eb222d63b6feb234c6a21c0c9" have entirely different histories.

4 changed files with 33 additions and 62 deletions

View File

@ -3,36 +3,34 @@
# UNITY_EMAIL: Unity user email to login # UNITY_EMAIL: Unity user email to login
# UNITY_PASSWORD: Unity user password to login # UNITY_PASSWORD: Unity user password to login
name: 🧪 Test name: 🧪 Test
run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }}) run-name: 🧪 Test (${{ github.ref_name }})
env: env:
# MINIMUM_VERSION: The minimum version of Unity. # MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 2019.4 MINIMUM_VERSION: 2019.4
# EXCLUDE_FILTER: The excluded versions of Unity. # EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.3)" EXCLUDE_FILTER: '(2020.2.0|2021.1|2023.3)'
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
usePeriodVersions: usePeriodVersions:
description: "Use the period versions (.0f1, .10f1, 20f1, ...)." description: 'Use the period versions (.0f1, .10f1, 20f1, ...).'
required: false required: false
default: "true" default: 'true'
push: push:
branches: branches:
- develop - develop
- develop-preview - develop-preview
- develop-4.x
tags: tags:
- "!*" - "!*"
paths-ignore: paths-ignore:
- "**.md" - "*.md"
pull_request_target: pull_request:
types: types:
- opened - opened
- reopened
- synchronize - synchronize
paths-ignore:
- "**.md"
jobs: jobs:
setup: setup:
@ -45,7 +43,7 @@ jobs:
id: setup id: setup
run: | run: |
echo "==== Target Unity Versions ====" echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset@latest list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all` LATEST_VERSIONS=`npx unity-changeset@2.2.3 list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json` ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
else else
@ -59,6 +57,10 @@ jobs:
test: test:
name: 🧪 Run tests name: 🧪 Run tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
permissions: permissions:
checks: write checks: write
contents: read contents: read
@ -69,29 +71,14 @@ jobs:
matrix: matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }} unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps: steps:
- name: 🚚 Checkout ($${{ github.ref }}) - name: 🚚 Checkout
if: github.event_name == 'push'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 🚚 Marge pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
- name: 📥 Cache library - name: 📥 Cache library
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: Library path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }} key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
restore-keys: | restore-keys: |
Library-${{ matrix.unityVersion }}- Library-${{ matrix.unityVersion }}-
Library- Library-
@ -104,21 +91,14 @@ jobs:
targetPlatform: StandaloneLinux64 targetPlatform: StandaloneLinux64
allowDirtyBuild: true allowDirtyBuild: true
customParameters: -nographics customParameters: -nographics
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- name: 🧪 Run tests # - name: 🧪 Run tests
uses: game-ci/unity-test-runner@v4 # uses: game-ci/unity-test-runner@v4
timeout-minutes: 45 # timeout-minutes: 45
with: # with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} # customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# unityVersion: ${{ matrix.unityVersion }} # # unityVersion: ${{ matrix.unityVersion }}
customParameters: -nographics # customParameters: -nographics
checkName: ${{ matrix.unityVersion }} Test Results # checkName: ${{ matrix.unityVersion }} Test Results
githubToken: ${{ github.token }} # githubToken: ${{ github.token }}
env: # coverageOptions: "dontClear;generateHtmlReport;generateBadgeReport;pathFilters:+**/Packages/src/**;assemblyFilters:+<packages>,-*.Editor,-*.Test"
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

View File

@ -1,10 +1,3 @@
## [4.10.4](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.3...v4.10.4) (2024-12-19)
### Bug Fixes
* rendering issues when playing with opening a prefab stage ([95235a9](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/95235a929b82cf681365ed6eba837d857f83e3d2)), closes [#345](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/345)
## [4.10.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.2...v4.10.3) (2024-11-20) ## [4.10.3](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.10.2...v4.10.3) (2024-11-20)

View File

@ -17,15 +17,11 @@ namespace Coffee.UIParticleInternal
Type.GetType("UnityEditor.Experimental.U2D.SpriteEditorExtension, UnityEditor") Type.GetType("UnityEditor.Experimental.U2D.SpriteEditorExtension, UnityEditor")
?? Type.GetType("UnityEditor.U2D.SpriteEditorExtension, UnityEditor"); ?? Type.GetType("UnityEditor.U2D.SpriteEditorExtension, UnityEditor");
private static readonly Func<Sprite, Texture2D> s_GetActiveAtlasTextureMethod = private static readonly MethodInfo s_GetActiveAtlasTextureMethod = s_SpriteEditorExtensionType
(Func<Sprite, Texture2D>)Delegate.CreateDelegate(typeof(Func<Sprite, Texture2D>), .GetMethod("GetActiveAtlasTexture", BindingFlags.Static | BindingFlags.NonPublic);
s_SpriteEditorExtensionType
.GetMethod("GetActiveAtlasTexture", BindingFlags.Static | BindingFlags.NonPublic));
private static readonly Func<Sprite, SpriteAtlas> s_GetActiveAtlasMethod = private static readonly MethodInfo s_GetActiveAtlasMethod = s_SpriteEditorExtensionType
(Func<Sprite, SpriteAtlas>)Delegate.CreateDelegate(typeof(Func<Sprite, SpriteAtlas>), .GetMethod("GetActiveAtlas", BindingFlags.Static | BindingFlags.NonPublic);
s_SpriteEditorExtensionType
.GetMethod("GetActiveAtlas", BindingFlags.Static | BindingFlags.NonPublic));
/// <summary> /// <summary>
/// Get the actual texture of a sprite in play mode or edit mode. /// Get the actual texture of a sprite in play mode or edit mode.
@ -34,7 +30,9 @@ namespace Coffee.UIParticleInternal
{ {
if (!self) return null; if (!self) return null;
var ret = s_GetActiveAtlasTextureMethod(self); if (Application.isPlaying) return self.texture;
var ret = s_GetActiveAtlasTextureMethod.Invoke(null, new object[] { self }) as Texture2D;
return ret ? ret : self.texture; return ret ? ret : self.texture;
} }
@ -45,7 +43,7 @@ namespace Coffee.UIParticleInternal
{ {
if (!self) return null; if (!self) return null;
return s_GetActiveAtlasMethod(self); return s_GetActiveAtlasMethod.Invoke(null, new object[] { self }) as SpriteAtlas;
} }
#else #else
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@
"name": "com.coffee.ui-particle", "name": "com.coffee.ui-particle",
"displayName": "UI Particle", "displayName": "UI Particle",
"description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.", "description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.",
"version": "4.10.4", "version": "4.10.3",
"unity": "2018.2", "unity": "2018.2",
"license": "MIT", "license": "MIT",
"repository": { "repository": {