Skip to content

Commit 05c7a0e

Browse files
author
András Kurai
committed
Merge branch 'feature/add-qol-fixes' into develop
2 parents e7ade44 + 9dbdf45 commit 05c7a0e

File tree

17 files changed

+109
-47
lines changed

17 files changed

+109
-47
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# 0.1.1
1+
# 0.2.0
22
- Add documentation website
3-
- Reference website in `package.json`
3+
- Reference documentation in `package.json`
4+
- Make using namespaces optional
5+
- Configure using directives
6+
- Remove `IsResource` property from `IResourceData`. Scene path generation now depends on file extension
7+
- Handle spaces in filenames
8+
- Add known issues and update guide in the documentation
49

510
# 0.1.0
611
- Add initial project

Documentation/articles/Customization.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ The data section describes the automatically generated file mappings. The data i
2727

2828
The default mappings are created from the [Unity documentation](https://docs.unity3d.com/Manual/BuiltInImporters.html). If you know of any valid file mapping that the documentation does not state, please fork and create a Pull Request, or create an [Issue](https://github.com/AutSoft/UnityResourceGenerator/issues/new).
2929

30+
> [!WARNING]
31+
> Scenes have special handling during the file generation, because of the way scenes paths are used by the SceneManager. Scenes are identified by the file ending `.unity`
32+
3033
## Extending the generated classes
3134

3235
The generated classes are `partial` by default. This means that if you want to add custom methods, simply create another `partial` class and add your code there.

Documentation/articles/Extensibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ A module is single string that is placed inside the main generated class. To cre
1111
A post processor is a piece of code that is run after all modules are produced, and the final file text is created. To create a post processor implement the [IResourcePostProcessor](xref:AutSoft.UnityResourceGenerator.Editor.Generation.IResourcePostProcessor) interface. The implementation must provide a parameterless constructor.
1212

1313
The input of the processor is the current state of the generated file and it returns the new state of the generated file. Post processors also provide a Priority property which determines the ordering of them.
14+
15+
## Using directives
16+
17+
The generated using directives are also customizable under the settings window. If your custom generated code will require other using directives, there is no need to generate them, simply add them in the settings
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Known issues
2+
3+
## 0.1.0 - *
4+
5+
- SpecialCharacters can break generated names.
6+
- Numbers at the end of the files are supported, but not at the start
7+
- Any character in the filename which would not be a valid C# filed/property/method name will break the generated code
8+
- Spaces get removed
9+
- For Example:
10+
- `Coin1` works
11+
- `Coin 1` works
12+
- `1Coin` does not
13+
- `!Coin` does not
14+
- `Coin!` does not
15+
16+
- Duplicate file names in the same class module will break the generated file. The solution for this requires further investigation
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Upgrade Guide
2+
3+
Always update using the Unity Package Manager
4+
5+
## 0.1.0 - *
6+
- If default file mappings or namespaces change, and you have custom ones, it is advised that you create a copy of your old settings, press the `Reset file mappings` button in the `Project Settings` window and then manually recreate your custom mappings.

Documentation/articles/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
href: Customization.md
55
- name: Extensibility
66
href: Extensibility.md
7+
- name: Known Issues
8+
href: KnownIssues.md
9+
- name: Upgrade Guide
10+
href: UpgradeGuide.md
4.38 KB
Loading

UnityResourceGenerator/Assets/AutSoft.UnityResourceGenerator.Sample/ResourcePaths.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static partial class Materials
3131
}
3232
public static partial class AudioClips
3333
{
34-
public const string CoinSpin = "CoinSpin";
34+
public const string CoinSpin = "Coin Spin";
3535
public static AudioClip LoadCoinSpin() => Resources.Load<AudioClip>(CoinSpin);
3636
public const string Coin = "Coin";
3737
public static AudioClip LoadCoin() => Resources.Load<AudioClip>(Coin);

UnityResourceGenerator/Assets/AutSoft.UnityResourceGenerator.Sample/Resources/CoinSpin.mp3 renamed to UnityResourceGenerator/Assets/AutSoft.UnityResourceGenerator.Sample/Resources/Coin Spin.mp3

File renamed without changes.

UnityResourceGenerator/Assets/AutSoft.UnityResourceGenerator.Sample/Resources/CoinSpin.mp3.meta renamed to UnityResourceGenerator/Assets/AutSoft.UnityResourceGenerator.Sample/Resources/Coin Spin.mp3.meta

File renamed without changes.

0 commit comments

Comments
 (0)