Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
root = true

[*.cs]
indent_style = space
indent_size = 4
# Match the existing Unity C# sources; keep each file's existing BOM.
end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true

csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current

csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_parentheses = none
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_before_comma = false
csharp_space_after_comma = true
csharp_space_before_dot = false
csharp_space_after_dot = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_open_square_brackets = false
csharp_space_between_square_brackets = false
csharp_space_between_empty_square_brackets = false
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = false

# SDK whitespace formatting does not enforce spacing between members.
# These targeted StyleCop rules also run through tools/format-csharp.py.
dotnet_diagnostic.SA1107.severity = warning
dotnet_diagnostic.SA1502.severity = warning
dotnet_diagnostic.SA1507.severity = warning
dotnet_diagnostic.SA1516.severity = warning
17 changes: 15 additions & 2 deletions .github/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ macOS, Linux, and 32-bit/64-bit Windows. The workflows run only on pull requests
New commits cancel superseded runs for the same pull request and workflow.
Successful desktop/Android builds upload artifacts.

The separate `Code style` workflow verifies changed owned C# files with the SDK's
`dotnet format`, using `.editorconfig` and the SDK pinned in `global.json`.
It combines whitespace formatting with pinned StyleCop layout rules SA1107, SA1502,
SA1507 and SA1516 to enforce separate statements, multiline blocks and blank lines
between members. StyleCop is restored only into the temporary formatting project.
It parses both PAL3 and PAL3A conditional branches without Unity or game data.
Run `python3 tools/format-csharp.py` locally to format current changes, then
`python3 tools/format-csharp.py --check` to verify them. CI selects PR changes with
`--check --base <base-sha>`; `--all` is an explicit full-source audit, not the default.
Default and `--base` runs apply formatting only to changed lines and deletion
boundaries, preserving existing formatting elsewhere. Explicit file/directory
paths and `--all` format whole files. Check mode operates on temporary copies.
This checks whitespace and layout, not semantic correctness or Unity behavior.

Codacy is not part of this repository's CI. Its repository webhook is disabled;
there is no Codacy workflow or Codacy-required branch protection check. Re-enabling
that external integration would resume its checks independently of these workflows.
Expand All @@ -15,8 +29,7 @@ The builder CLI is pinned to v0.1.73 so its behavior does not change independent
of the workflow. Update and validate this pin together with builder upgrades.

Keep the committed project configured for PAL3. PAL3A workflows switch their own
checkout before building. Public builds reject imported private VFX and legacy Toon assets;
do not add them or original game data to CI inputs.
checkout before building. Do not add original game data to CI inputs.

When investigating a failure, inspect the failed job's Unity/build logs first.
Retry an isolated runner or network failure after checking the log; fix reproducible
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Code style

on:
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
csharp-format:
name: C# formatting (PAL3 and PAL3A)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v5.3.0
with:
global-json-file: global.json
- name: Test formatter enforcement
run: python3 tools/tests/test-format-csharp.py
- name: Verify changed C# formatting
env:
BASE_REF: ${{ github.event.pull_request.base.sha }}
run: python3 tools/format-csharp.py --check --base "$BASE_REF"
23 changes: 9 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,15 @@ crashlytics-build.properties
# Unity StreamingAssets folder
/Assets/StreamingAssets

# 3rd party plugin/assets
/Assets/Hovl Studio
# VS Conde config file
.vsconfig

# Local asset imports
/Assets/Hovl Studio/
/Assets/Hovl Studio.meta
/Assets/RealToon
/Assets/RealToon/
/Assets/RealToon.meta

# VFX prefabs that are using 3rd party assets
/Assets/Resources/Prefabs/VFX/PAL3/*.prefab
/Assets/Resources/Prefabs/VFX/PAL3/*.meta
/Assets/Resources/Prefabs/VFX/PAL3A/*.prefab
/Assets/Resources/Prefabs/VFX/PAL3A/*.meta

# Materials that are using 3rd party assets
/Assets/Resources/Prefabs/VFX/
/Assets/Resources/Prefabs/VFX.meta
/Assets/Resources/Materials/

# VS Conde config file
.vsconfig
/Assets/Resources/Materials.meta
8 changes: 0 additions & 8 deletions Assets/Resources/Materials.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Resources/Prefabs/VFX.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Resources/Prefabs/VFX/PAL3.meta

This file was deleted.

45 changes: 0 additions & 45 deletions Assets/Resources/Prefabs/VFX/PAL3/README.txt

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/Resources/Prefabs/VFX/PAL3/README.txt.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Resources/Prefabs/VFX/PAL3A.meta

This file was deleted.

67 changes: 0 additions & 67 deletions Assets/Resources/Prefabs/VFX/PAL3A/README.txt

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/Resources/Prefabs/VFX/PAL3A/README.txt.meta

This file was deleted.

78 changes: 78 additions & 0 deletions Assets/Resources/Shaders/Pal3OriginalEffect.shader
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// ------------------------------------------------------------------------
// Copyright (c) 2026, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ------------------------------------------------------------------------

Shader "Pal3/OriginalEffect"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source blend", Float) = 1
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination blend", Float) = 1
[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("Depth test", Float) = 4
[Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 0
_AlphaMode ("Original alpha operation", Float) = 0
}
SubShader
{
Tags
{
"RenderPipeline" = "UniversalPipeline"
"Queue" = "Transparent"
"RenderType" = "Transparent"
}
Pass
{
Tags { "LightMode" = "SRPDefaultUnlit" }
Blend [_SrcBlend] [_DstBlend]
ZTest [_ZTest]
ZWrite Off
Cull [_Cull]
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment Frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes
{
float3 positionOS : POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
half4 color : COLOR;
};
TEXTURE2D(_MainTex);
SAMPLER(sampler_MainTex);
CBUFFER_START(UnityPerMaterial)
float _AlphaMode;
CBUFFER_END
Varyings Vert(Attributes i)
{
Varyings o;
o.positionCS = TransformObjectToHClip(i.positionOS);
o.uv = i.uv;
o.color = i.color;
return o;
}
half4 Frag(Varyings i) : SV_Target
{
half4 tex = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
half4 col = tex * i.color;
if (_AlphaMode > 1.5)
{
col.a = tex.a;
}
else if (_AlphaMode > 0.5)
{
col.a = saturate(tex.a + i.color.a);
}
return col;
}
ENDHLSL
}
}
}
9 changes: 9 additions & 0 deletions Assets/Resources/Shaders/Pal3OriginalEffect.shader.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading