Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support glob pattern in LoadScene attribute #66

Merged
merged 3 commits into from
Apr 28, 2024

Conversation

nowsprinting
Copy link
Owner

@nowsprinting nowsprinting commented Mar 24, 2024

Can be specified path by glob pattern in LoadSceneAttribute.
However, there are restrictions, top level and scene name cannot be omitted.

Usage:

[TestFixture]
public class MyTestClass
{
    [Test]
    [LoadScene("Packages/YourPackageName/**/SampleScene.unity")]
    public void UsingGlobPattern()
    {
        // snip
    }
}

@github-actions github-actions bot added the enhancement New feature or request label Mar 24, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@nowsprinting nowsprinting force-pushed the feature/glob_loadscene branch 6 times, most recently from 9d0b46a to ebab26e Compare April 28, 2024 11:43

This comment has been minimized.

Copy link

Code Metrics Report

master (8f12462) #66 (d7c8782) +/-
Coverage 66.8% 70.1% +3.3%
Code to Test Ratio 1:1.1 1:1.0 -0.1
Details
  |                    | master (8f12462) | #66 (d7c8782) |  +/-  |
  |--------------------|------------------|---------------|-------|
+ | Coverage           |            66.8% |         70.1% | +3.3% |
  |   Files            |               24 |            25 |    +1 |
  |   Lines            |              548 |           618 |   +70 |
+ |   Covered          |              366 |           433 |   +67 |
- | Code to Test Ratio |            1:1.1 |         1:1.0 |  -0.1 |
  |   Code             |             1046 |          1162 |  +116 |
+ |   Test             |             1103 |          1117 |   +14 |

Code coverage of files in pull request scope (57.5% → 75.3%)

Files Coverage +/-
Editor/TemporaryBuildScenesUsingInTest.cs 43.9% +0.2%
Runtime/Attributes/LoadSceneAttribute.cs 88.5% +0.5%
Runtime/Utils/ScenePathFinder.cs 97.0% +97.0%

Reported by octocov

@nowsprinting nowsprinting merged commit cc6c306 into master Apr 28, 2024
8 checks passed
@nowsprinting nowsprinting deleted the feature/glob_loadscene branch April 28, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant