Compare commits
5 Commits
a7470ad69b
...
feature/wo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfa0ca0bfd | ||
|
|
105da8850a | ||
|
|
796dbca5d8 | ||
|
|
4c34207707 | ||
|
|
49a2ed94f4 |
@@ -64,11 +64,11 @@ MonoBehaviour:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
DebugMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
HBuffer:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
m_OverrideState: 1
|
||||
m_Value: 2
|
||||
ExcludeCastingMask:
|
||||
m_OverrideState: 0
|
||||
m_Value:
|
||||
|
||||
8
Assets/Map/Materials/Structure Materials.meta
Normal file
8
Assets/Map/Materials/Structure Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c31396ab697cae43913d71893cc1c80
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,630 @@
|
||||
// Toony Colors Pro+Mobile 2
|
||||
// (c) 2014-2025 Jean Moreno
|
||||
|
||||
Shader "Reset/BuildingStyleTest"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[TCP2HeaderHelp(Base)]
|
||||
[MainColor] _BaseColor ("Color", Color) = (1,1,1,1)
|
||||
[TCP2ColorNoAlpha] _HColor ("Highlight Color", Color) = (0.75,0.75,0.75,1)
|
||||
[TCP2ColorNoAlpha] _SColor ("Shadow Color", Color) = (0.2,0.2,0.2,1)
|
||||
[MainTexture] _BaseMap ("Albedo", 2D) = "white" {}
|
||||
[TCP2Separator]
|
||||
|
||||
[TCP2Header(Ramp Shading)]
|
||||
|
||||
_RampThreshold ("Threshold", Range(0.01,1)) = 0.5
|
||||
_RampSmoothing ("Smoothing", Range(0.001,1)) = 0.5
|
||||
[TCP2Separator]
|
||||
|
||||
[TCP2HeaderHelp(Normal Mapping)]
|
||||
[NoScaleOffset] _BumpMap ("Normal Map", 2D) = "bump" {}
|
||||
[TCP2Separator]
|
||||
|
||||
[ToggleOff(_RECEIVE_SHADOWS_OFF)] _ReceiveShadowsOff ("Receive Shadows", Float) = 1
|
||||
|
||||
// Avoid compile error if the properties are ending with a drawer
|
||||
[HideInInspector] __dummy__ ("unused", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline" = "UniversalPipeline"
|
||||
"RenderType"="Opaque"
|
||||
}
|
||||
|
||||
HLSLINCLUDE
|
||||
#define fixed half
|
||||
#define fixed2 half2
|
||||
#define fixed3 half3
|
||||
#define fixed4 half4
|
||||
|
||||
#if UNITY_VERSION >= 202020
|
||||
#define URP_10_OR_NEWER
|
||||
#endif
|
||||
#if UNITY_VERSION >= 202120
|
||||
#define URP_12_OR_NEWER
|
||||
#endif
|
||||
#if UNITY_VERSION >= 202220
|
||||
#define URP_14_OR_NEWER
|
||||
#endif
|
||||
|
||||
// Texture/Sampler abstraction
|
||||
#define TCP2_TEX2D_WITH_SAMPLER(tex) TEXTURE2D(tex); SAMPLER(sampler##tex)
|
||||
#define TCP2_TEX2D_NO_SAMPLER(tex) TEXTURE2D(tex)
|
||||
#define TCP2_TEX2D_SAMPLE(tex, samplertex, coord) SAMPLE_TEXTURE2D(tex, sampler##samplertex, coord)
|
||||
#define TCP2_TEX2D_SAMPLE_LOD(tex, samplertex, coord, lod) SAMPLE_TEXTURE2D_LOD(tex, sampler##samplertex, coord, lod)
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
// Uniforms
|
||||
|
||||
// Shader Properties
|
||||
TCP2_TEX2D_WITH_SAMPLER(_BumpMap);
|
||||
TCP2_TEX2D_WITH_SAMPLER(_BaseMap);
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
|
||||
// Shader Properties
|
||||
float4 _BaseMap_ST;
|
||||
fixed4 _BaseColor;
|
||||
float _RampThreshold;
|
||||
float _RampSmoothing;
|
||||
fixed4 _SColor;
|
||||
fixed4 _HColor;
|
||||
CBUFFER_END
|
||||
|
||||
// Built-in renderer (CG) to SRP (HLSL) bindings
|
||||
#define UnityObjectToClipPos TransformObjectToHClip
|
||||
#define _WorldSpaceLightPos0 _MainLightPosition
|
||||
|
||||
ENDHLSL
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Main"
|
||||
Tags
|
||||
{
|
||||
"LightMode"="UniversalForward"
|
||||
}
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard SRP library
|
||||
// All shaders must be compiled with HLSLcc and currently only gles is not using HLSLcc by default
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#pragma target 3.0
|
||||
|
||||
// -------------------------------------
|
||||
// Material keywords
|
||||
#pragma shader_feature_local _ _RECEIVE_SHADOWS_OFF
|
||||
|
||||
// -------------------------------------
|
||||
// Universal Render Pipeline keywords
|
||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
|
||||
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
|
||||
#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
|
||||
#pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
|
||||
|
||||
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
|
||||
#pragma multi_compile _ SHADOWS_SHADOWMASK
|
||||
#pragma multi_compile _ _CLUSTER_LIGHT_LOOP
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
#pragma vertex Vertex
|
||||
#pragma fragment Fragment
|
||||
|
||||
// vertex input
|
||||
struct Attributes
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
// vertex output / fragment input
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 worldPosAndFog : TEXCOORD0;
|
||||
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||||
float4 shadowCoord : TEXCOORD1; // compute shadow coord per-vertex for the main light
|
||||
#endif
|
||||
#ifdef _ADDITIONAL_LIGHTS_VERTEX
|
||||
half3 vertexLights : TEXCOORD2;
|
||||
#endif
|
||||
float3 pack0 : TEXCOORD3; /* pack0.xyz = tangent */
|
||||
float3 pack1 : TEXCOORD4; /* pack1.xyz = bitangent */
|
||||
float2 pack2 : TEXCOORD5; /* pack2.xy = texcoord0 */
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#if USE_FORWARD_PLUS || USE_CLUSTER_LIGHT_LOOP
|
||||
// Fake InputData struct needed for Forward+ macro
|
||||
struct InputDataForwardPlusDummy
|
||||
{
|
||||
float3 positionWS;
|
||||
float2 normalizedScreenSpaceUV;
|
||||
};
|
||||
#endif
|
||||
|
||||
Varyings Vertex(Attributes input)
|
||||
{
|
||||
Varyings output = (Varyings)0;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
// Texture Coordinates
|
||||
output.pack2.xy.xy = input.texcoord0.xy * _BaseMap_ST.xy + _BaseMap_ST.zw;
|
||||
|
||||
VertexPositionInputs vertexInput = GetVertexPositionInputs(input.vertex.xyz);
|
||||
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||||
output.shadowCoord = GetShadowCoord(vertexInput);
|
||||
#endif
|
||||
|
||||
VertexNormalInputs vertexNormalInput = GetVertexNormalInputs(input.normal, input.tangent);
|
||||
#ifdef _ADDITIONAL_LIGHTS_VERTEX
|
||||
// Vertex lighting
|
||||
output.vertexLights = VertexLighting(vertexInput.positionWS, vertexNormalInput.normalWS);
|
||||
#endif
|
||||
|
||||
// world position
|
||||
output.worldPosAndFog = float4(vertexInput.positionWS.xyz, 0);
|
||||
|
||||
// normal
|
||||
output.normal = normalize(vertexNormalInput.normalWS);
|
||||
|
||||
// tangent
|
||||
output.pack0.xyz = vertexNormalInput.tangentWS;
|
||||
output.pack1.xyz = vertexNormalInput.bitangentWS;
|
||||
|
||||
// clip position
|
||||
output.positionCS = vertexInput.positionCS;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
half4 Fragment(Varyings input
|
||||
) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
|
||||
|
||||
float3 positionWS = input.worldPosAndFog.xyz;
|
||||
float3 normalWS = normalize(input.normal);
|
||||
half3 tangentWS = input.pack0.xyz;
|
||||
half3 bitangentWS = input.pack1.xyz;
|
||||
half3x3 tangentToWorldMatrix = half3x3(tangentWS.xyz, bitangentWS.xyz, normalWS.xyz);
|
||||
|
||||
// Shader Properties Sampling
|
||||
float4 __normalMap = ( TCP2_TEX2D_SAMPLE(_BumpMap, _BumpMap, input.pack2.xy).rgba );
|
||||
float4 __albedo = ( TCP2_TEX2D_SAMPLE(_BaseMap, _BaseMap, input.pack2.xy).rgba );
|
||||
float4 __mainColor = ( _BaseColor.rgba );
|
||||
float __alpha = ( __albedo.a * __mainColor.a );
|
||||
float __ambientIntensity = ( 1.0 );
|
||||
float __rampThreshold = ( _RampThreshold );
|
||||
float __rampSmoothing = ( _RampSmoothing );
|
||||
float3 __shadowColor = ( _SColor.rgb );
|
||||
float3 __highlightColor = ( _HColor.rgb );
|
||||
|
||||
half4 normalMap = __normalMap;
|
||||
half3 normalTS = UnpackNormal(normalMap);
|
||||
normalWS = normalize( mul(normalTS, tangentToWorldMatrix) );
|
||||
|
||||
// main texture
|
||||
half3 albedo = __albedo.rgb;
|
||||
half alpha = __alpha;
|
||||
|
||||
half3 emission = half3(0,0,0);
|
||||
|
||||
albedo *= __mainColor.rgb;
|
||||
|
||||
// main light: direction, color, distanceAttenuation, shadowAttenuation
|
||||
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||||
float4 shadowCoord = input.shadowCoord;
|
||||
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||||
float4 shadowCoord = TransformWorldToShadowCoord(positionWS);
|
||||
#else
|
||||
float4 shadowCoord = float4(0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
#if defined(URP_10_OR_NEWER)
|
||||
#if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON)
|
||||
half4 shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);
|
||||
#elif !defined (LIGHTMAP_ON)
|
||||
half4 shadowMask = unity_ProbesOcclusion;
|
||||
#else
|
||||
half4 shadowMask = half4(1, 1, 1, 1);
|
||||
#endif
|
||||
|
||||
Light mainLight = GetMainLight(shadowCoord, positionWS, shadowMask);
|
||||
#else
|
||||
Light mainLight = GetMainLight(shadowCoord);
|
||||
#endif
|
||||
|
||||
#if defined(_SCREEN_SPACE_OCCLUSION) || defined(USE_FORWARD_PLUS) || defined(USE_CLUSTER_LIGHT_LOOP)
|
||||
float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
|
||||
#endif
|
||||
|
||||
// ambient or lightmap
|
||||
// Samples SH fully per-pixel. SampleSHVertex and SampleSHPixel functions
|
||||
// are also defined in case you want to sample some terms per-vertex.
|
||||
half3 bakedGI = SampleSH(normalWS);
|
||||
half occlusion = 1;
|
||||
|
||||
half3 indirectDiffuse = bakedGI;
|
||||
indirectDiffuse *= occlusion * albedo * __ambientIntensity;
|
||||
|
||||
half3 lightDir = mainLight.direction;
|
||||
half3 lightColor = mainLight.color.rgb;
|
||||
|
||||
half atten = mainLight.shadowAttenuation * mainLight.distanceAttenuation;
|
||||
|
||||
half ndl = dot(normalWS, lightDir);
|
||||
half3 ramp;
|
||||
|
||||
half rampThreshold = __rampThreshold;
|
||||
half rampSmooth = __rampSmoothing * 0.5;
|
||||
ndl = saturate(ndl);
|
||||
ramp = smoothstep(rampThreshold - rampSmooth, rampThreshold + rampSmooth, ndl);
|
||||
|
||||
// apply attenuation
|
||||
ramp *= atten;
|
||||
|
||||
half3 color = half3(0,0,0);
|
||||
half3 accumulatedRamp = ramp * max(lightColor.r, max(lightColor.g, lightColor.b));
|
||||
half3 accumulatedColors = ramp * lightColor.rgb;
|
||||
|
||||
// Additional lights loop
|
||||
#ifdef _ADDITIONAL_LIGHTS
|
||||
uint pixelLightCount = GetAdditionalLightsCount();
|
||||
|
||||
#if USE_FORWARD_PLUS || USE_CLUSTER_LIGHT_LOOP
|
||||
// Additional directional lights in Forward+
|
||||
for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++)
|
||||
{
|
||||
CLUSTER_LIGHT_LOOP_SUBTRACTIVE_LIGHT_CHECK
|
||||
|
||||
Light light = GetAdditionalLight(lightIndex, positionWS, shadowMask);
|
||||
|
||||
#if defined(_LIGHT_LAYERS)
|
||||
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
||||
#endif
|
||||
{
|
||||
half atten = light.shadowAttenuation * light.distanceAttenuation;
|
||||
|
||||
#if defined(_LIGHT_LAYERS)
|
||||
half3 lightDir = half3(0, 1, 0);
|
||||
half3 lightColor = half3(0, 0, 0);
|
||||
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
||||
{
|
||||
lightColor = light.color.rgb;
|
||||
lightDir = light.direction;
|
||||
}
|
||||
#else
|
||||
half3 lightColor = light.color.rgb;
|
||||
half3 lightDir = light.direction;
|
||||
#endif
|
||||
|
||||
half ndl = dot(normalWS, lightDir);
|
||||
half3 ramp;
|
||||
|
||||
ndl = saturate(ndl);
|
||||
ramp = smoothstep(rampThreshold - rampSmooth, rampThreshold + rampSmooth, ndl);
|
||||
|
||||
// apply attenuation (shadowmaps & point/spot lights attenuation)
|
||||
ramp *= atten;
|
||||
|
||||
accumulatedRamp += ramp * max(lightColor.r, max(lightColor.g, lightColor.b));
|
||||
accumulatedColors += ramp * lightColor.rgb;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Data with dummy struct used in Forward+ macro (LIGHT_LOOP_BEGIN)
|
||||
InputDataForwardPlusDummy inputData;
|
||||
inputData.normalizedScreenSpaceUV = normalizedScreenSpaceUV;
|
||||
inputData.positionWS = positionWS;
|
||||
#endif
|
||||
|
||||
LIGHT_LOOP_BEGIN(pixelLightCount)
|
||||
{
|
||||
#if defined(URP_10_OR_NEWER)
|
||||
Light light = GetAdditionalLight(lightIndex, positionWS, shadowMask);
|
||||
#else
|
||||
Light light = GetAdditionalLight(lightIndex, positionWS);
|
||||
#endif
|
||||
half atten = light.shadowAttenuation * light.distanceAttenuation;
|
||||
|
||||
#if defined(_LIGHT_LAYERS)
|
||||
half3 lightDir = half3(0, 1, 0);
|
||||
half3 lightColor = half3(0, 0, 0);
|
||||
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
||||
{
|
||||
lightColor = light.color.rgb;
|
||||
lightDir = light.direction;
|
||||
}
|
||||
#else
|
||||
half3 lightColor = light.color.rgb;
|
||||
half3 lightDir = light.direction;
|
||||
#endif
|
||||
|
||||
half ndl = dot(normalWS, lightDir);
|
||||
half3 ramp;
|
||||
|
||||
ndl = saturate(ndl);
|
||||
ramp = smoothstep(rampThreshold - rampSmooth, rampThreshold + rampSmooth, ndl);
|
||||
|
||||
// apply attenuation (shadowmaps & point/spot lights attenuation)
|
||||
ramp *= atten;
|
||||
|
||||
accumulatedRamp += ramp * max(lightColor.r, max(lightColor.g, lightColor.b));
|
||||
accumulatedColors += ramp * lightColor.rgb;
|
||||
|
||||
}
|
||||
LIGHT_LOOP_END
|
||||
#endif
|
||||
#ifdef _ADDITIONAL_LIGHTS_VERTEX
|
||||
color += input.vertexLights * albedo;
|
||||
#endif
|
||||
|
||||
accumulatedRamp = saturate(accumulatedRamp);
|
||||
half3 shadowColor = (1 - accumulatedRamp.rgb) * __shadowColor;
|
||||
accumulatedRamp = accumulatedColors.rgb * __highlightColor + shadowColor;
|
||||
color += albedo * accumulatedRamp;
|
||||
|
||||
// apply ambient
|
||||
color += indirectDiffuse;
|
||||
|
||||
color += emission;
|
||||
|
||||
return half4(color, alpha);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
// Depth & Shadow Caster Passes
|
||||
HLSLINCLUDE
|
||||
|
||||
#if defined(SHADOW_CASTER_PASS) || defined(DEPTH_ONLY_PASS)
|
||||
|
||||
#define fixed half
|
||||
#define fixed2 half2
|
||||
#define fixed3 half3
|
||||
#define fixed4 half4
|
||||
|
||||
float3 _LightDirection;
|
||||
float3 _LightPosition;
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
#if defined(DEPTH_NORMALS_PASS)
|
||||
float3 normalWS : TEXCOORD0;
|
||||
#endif
|
||||
float2 pack0 : TEXCOORD1; /* pack0.xy = texcoord0 */
|
||||
#if defined(DEPTH_ONLY_PASS)
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
#endif
|
||||
};
|
||||
|
||||
float4 GetShadowPositionHClip(Attributes input)
|
||||
{
|
||||
float3 positionWS = TransformObjectToWorld(input.vertex.xyz);
|
||||
float3 normalWS = TransformObjectToWorldNormal(input.normal);
|
||||
|
||||
#if _CASTING_PUNCTUAL_LIGHT_SHADOW
|
||||
float3 lightDirectionWS = normalize(_LightPosition - positionWS);
|
||||
#else
|
||||
float3 lightDirectionWS = _LightDirection;
|
||||
#endif
|
||||
float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS));
|
||||
|
||||
#if UNITY_REVERSED_Z
|
||||
positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE);
|
||||
#else
|
||||
positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE);
|
||||
#endif
|
||||
|
||||
return positionCS;
|
||||
}
|
||||
|
||||
Varyings ShadowDepthPassVertex(Attributes input)
|
||||
{
|
||||
Varyings output = (Varyings)0;
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
#if defined(DEPTH_ONLY_PASS)
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
#endif
|
||||
|
||||
// Texture Coordinates
|
||||
output.pack0.xy.xy = input.texcoord0.xy * _BaseMap_ST.xy + _BaseMap_ST.zw;
|
||||
|
||||
#if defined(DEPTH_ONLY_PASS)
|
||||
output.positionCS = TransformObjectToHClip(input.vertex.xyz);
|
||||
#if defined(DEPTH_NORMALS_PASS)
|
||||
float3 normalWS = TransformObjectToWorldNormal(input.normal);
|
||||
output.normalWS = normalWS; // already normalized in TransformObjectToWorldNormal
|
||||
#endif
|
||||
#elif defined(SHADOW_CASTER_PASS)
|
||||
output.positionCS = GetShadowPositionHClip(input);
|
||||
#else
|
||||
output.positionCS = float4(0,0,0,0);
|
||||
#endif
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
half4 ShadowDepthPassFragment(
|
||||
Varyings input
|
||||
#if defined(DEPTH_NORMALS_PASS) && defined(_WRITE_RENDERING_LAYERS)
|
||||
#if UNITY_VERSION >= 60020000
|
||||
, out uint outRenderingLayers : SV_Target1
|
||||
#else
|
||||
, out float4 outRenderingLayers : SV_Target1
|
||||
#endif
|
||||
#endif
|
||||
) : SV_TARGET
|
||||
{
|
||||
#if defined(DEPTH_ONLY_PASS)
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
|
||||
#endif
|
||||
|
||||
// Shader Properties Sampling
|
||||
float4 __albedo = ( TCP2_TEX2D_SAMPLE(_BaseMap, _BaseMap, input.pack0.xy).rgba );
|
||||
float4 __mainColor = ( _BaseColor.rgba );
|
||||
float __alpha = ( __albedo.a * __mainColor.a );
|
||||
|
||||
half3 albedo = half3(1,1,1);
|
||||
half alpha = __alpha;
|
||||
half3 emission = half3(0,0,0);
|
||||
|
||||
#if defined(DEPTH_NORMALS_PASS)
|
||||
#if defined(_WRITE_RENDERING_LAYERS)
|
||||
#if UNITY_VERSION >= 60020000
|
||||
outRenderingLayers = EncodeMeshRenderingLayer();
|
||||
#else
|
||||
outRenderingLayers = float4(EncodeMeshRenderingLayer(GetMeshRenderingLayer()), 0, 0, 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(URP_12_OR_NEWER)
|
||||
return float4(input.normalWS.xyz, 0.0);
|
||||
#else
|
||||
return float4(PackNormalOctRectEncode(TransformWorldToViewDir(input.normalWS, true)), 0.0, 0.0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
ENDHLSL
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ShadowCaster"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "ShadowCaster"
|
||||
}
|
||||
|
||||
ZWrite On
|
||||
ZTest LEqual
|
||||
|
||||
HLSLPROGRAM
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#pragma target 2.0
|
||||
|
||||
// using simple #define doesn't work, we have to use this instead
|
||||
#pragma multi_compile SHADOW_CASTER_PASS
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
|
||||
|
||||
#pragma vertex ShadowDepthPassVertex
|
||||
#pragma fragment ShadowDepthPassFragment
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "DepthOnly"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "DepthOnly"
|
||||
}
|
||||
|
||||
ZWrite On
|
||||
ColorMask 0
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
// Required to compile gles 2.0 with standard srp library
|
||||
#pragma prefer_hlslcc gles
|
||||
#pragma exclude_renderers d3d11_9x
|
||||
#pragma target 2.0
|
||||
|
||||
//--------------------------------------
|
||||
// GPU Instancing
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
// using simple #define doesn't work, we have to use this instead
|
||||
#pragma multi_compile DEPTH_ONLY_PASS
|
||||
|
||||
#pragma vertex ShadowDepthPassVertex
|
||||
#pragma fragment ShadowDepthPassFragment
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "DepthNormals"
|
||||
Tags
|
||||
{
|
||||
"LightMode" = "DepthNormals"
|
||||
}
|
||||
|
||||
ZWrite On
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma exclude_renderers gles gles3 glcore
|
||||
#pragma target 2.0
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
|
||||
// using simple #define doesn't work, we have to use this instead
|
||||
#pragma multi_compile DEPTH_ONLY_PASS
|
||||
#pragma multi_compile DEPTH_NORMALS_PASS
|
||||
|
||||
#pragma vertex ShadowDepthPassVertex
|
||||
#pragma fragment ShadowDepthPassFragment
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
// Used for Baking GI. This pass is stripped from build.
|
||||
UsePass "Universal Render Pipeline/Lit/Meta"
|
||||
|
||||
}
|
||||
|
||||
FallBack "Hidden/InternalErrorShader"
|
||||
CustomEditor "ToonyColorsPro.ShaderGenerator.MaterialInspector_SG2"
|
||||
}
|
||||
|
||||
/* TCP_DATA u config(ver:"2.9.20";unity:"6000.2.1f1";tmplt:"SG2_Template_URP";features:list["UNITY_5_4","UNITY_5_5","UNITY_5_6","UNITY_2017_1","UNITY_2018_1","UNITY_2018_2","UNITY_2018_3","UNITY_2019_1","UNITY_2019_2","UNITY_2019_3","UNITY_2019_4","UNITY_2020_1","UNITY_2021_1","UNITY_2021_2","UNITY_2022_2","UNITY_6000_2","UNITY_6000_1","UNITY_6000_0","BUMP","ENABLE_FORWARD_PLUS","ENABLE_META_PASS","ENABLE_DEPTH_NORMALS_PASS","TEMPLATE_LWRP"];flags:list[];flags_extra:dict[pragma_gpu_instancing=list[]];keywords:dict[RENDER_TYPE="Opaque",RampTextureDrawer="[TCP2Gradient]",RampTextureLabel="Ramp Texture",SHADER_TARGET="3.0"];shaderProperties:list[,sp(name:"Main Color";imps:list[imp_mp_color(def:RGBA(1, 1, 1, 1);hdr:False;cc:4;chan:"RGBA";prop:"_BaseColor";md:"[MainColor]";gbv:False;custom:False;refs:"";pnlock:False;guid:"6607a4eb-4ec3-4a2f-91f4-5e9d30c96b2c";op:Multiply;lbl:"Color";gpu_inst:False;dots_inst:False;locked:False;impl_index:0)];layers:list[];unlocked:list[];layer_blend:dict[];custom_blend:dict[];clones:dict[];isClone:False),,,,,,,,,,,,,,,,,,,,,,sp(name:"Depth Test";imps:list[imp_enum(value_type:0;value:7;enum_type:"ToonyColorsPro.ShaderGenerator.CompareFunction";guid:"cb90e6a6-ef1d-4afe-97a6-a628f305e8e9";op:Multiply;lbl:"Depth Test";gpu_inst:False;dots_inst:False;locked:False;impl_index:0)];layers:list[];unlocked:list[];layer_blend:dict[];custom_blend:dict[];clones:dict[];isClone:False),sp(name:"Face Culling";imps:list[imp_enum(value_type:0;value:2;enum_type:"ToonyColorsPro.ShaderGenerator.Culling";guid:"23b023a2-e593-418e-97f2-8408d65cee24";op:Multiply;lbl:"Face Culling";gpu_inst:False;dots_inst:False;locked:False;impl_index:0)];layers:list[];unlocked:list[];layer_blend:dict[];custom_blend:dict[];clones:dict[];isClone:False)];customTextures:list[];codeInjection:codeInjection(injectedFiles:list[];mark:False);matLayers:list[]) */
|
||||
/* TCP_HASH b4abb9a88ff2f062c74f59baf3daf9e1 */
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c49399a261e65a4469a33a0000482822
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- _NoTileNoiseTex: {fileID: 2800000, guid: af5515bfe14f1af4a9b8b3bf306b9261, type: 3}
|
||||
- _Ramp: {fileID: 2800000, guid: ccad9b0732473ee4e95de81e50e9050f, type: 3}
|
||||
- _DitherTex: {fileID: 2800000, guid: f059f76a52d0b374c85c681ed571185e, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,154 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: StyleTestBuildingMat
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseColor:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseColorMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: e4da0c5e5eed1124f9e599f0edbc3ead, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: e4da0c5e5eed1124f9e599f0edbc3ead, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _RampSmoothing: 0.5
|
||||
- _RampThreshold: 0.424
|
||||
- _ReceiveShadows: 1
|
||||
- _ReceiveShadowsOff: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
- __dummy__: 0
|
||||
- _depthTest: 8
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 0.41700405, b: 0, a: 1}
|
||||
- _BaseMap: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _BaseMap1: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 1, g: 0.41700402, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _HColor: {r: 0.7830189, g: 0.7830189, b: 0.7830189, a: 1}
|
||||
- _SColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4222839493237202432
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbd8ead8450a4204d9c963f0d65532a3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -81,6 +81,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -81,6 +81,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -78,6 +78,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -78,6 +78,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
</member>
|
||||
<member name="F:Sirenix.OdinInspector.CustomContextMenuAttribute.MenuItem">
|
||||
<summary>
|
||||
The name of the menu item.
|
||||
A resolved string defining the name of the menu item.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Sirenix.OdinInspector.CustomContextMenuAttribute.MethodName">
|
||||
@@ -720,7 +720,7 @@
|
||||
<summary>
|
||||
Adds a custom option to the context menu of the property.
|
||||
</summary>
|
||||
<param name="menuItem">The name of the menu item.</param>
|
||||
<param name="menuItem">A resolved string defining the name of the menu item.</param>
|
||||
<param name="action">A resolved string defining the action to take when the context menu is clicked.</param>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.CustomValueDrawerAttribute">
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -970,6 +970,159 @@
|
||||
<param name="owner">The owner.</param>
|
||||
<param name="value">The value.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.HasAssociatedData(System.Int32)">
|
||||
<summary>
|
||||
Checks whether the allocated <see cref="T:UnityEngine.Rect"/> has data associated with it.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to check.</param>
|
||||
<returns><c>true</c> if the <see cref="T:UnityEngine.Rect"/> has data associated with it; otherwise <c>false</c>.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetAssociatedData(System.Int32)">
|
||||
<summary>
|
||||
Gets the data associated with the <see cref="T:UnityEngine.Rect"/> at the given <paramref name="index"/>; this is the second parameter assigned in the <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/> method.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to retrieve the associated data from.</param>
|
||||
<returns>The associated data.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetAssociatedData``1(System.Int32)">
|
||||
<summary>
|
||||
Gets the data associated with the <see cref="T:UnityEngine.Rect"/> at the given <see cref="!:index"/>; this is the second parameter assigned in the <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/> method.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to retrieve the associated data from.</param>
|
||||
<typeparam name="T">The expected associated data type.</typeparam>
|
||||
<returns>The associated data.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetIndentation(System.Int32)">
|
||||
<summary>
|
||||
Gets the indentation set for the <see cref="T:UnityEngine.Rect"/> at the given <paramref name="index"/>.
|
||||
</summary>
|
||||
<param name="index">The <paramref name="index"/> of the <see cref="T:UnityEngine.Rect"/> to retrieve the indentation for.</param>
|
||||
<returns>The indentation for the <see cref="T:UnityEngine.Rect"/>.</returns>
|
||||
<remarks>The indentation is set using <see cref="F:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.Indentation"/> during <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.BeginAllocations"/> and <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.EndAllocations"/>.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetCombinedRects">
|
||||
<summary>
|
||||
Creates a <see cref="T:UnityEngine.Rect"/> representing all the visible <see cref="T:UnityEngine.Rect"/>'s combined.
|
||||
</summary>
|
||||
<returns>The created <see cref="T:UnityEngine.Rect"/>.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)">
|
||||
<summary>
|
||||
Allocates an <see cref="T:UnityEngine.Rect"/> in the view, with the option to associate a given <see cref="T:System.Object"/> with it.
|
||||
</summary>
|
||||
<param name="height"></param>
|
||||
<param name="reference"></param>
|
||||
<remarks>Ensure <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.BeginAllocations"/> is called before calling this, and ensure <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.EndAllocations"/> is called after you're done with <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/></remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.DropCommit.TryCommit(Sirenix.OdinInspector.Editor.Internal.DesignerEditorContext,Sirenix.OdinInspector.Editor.Internal.DragAndDropState)">
|
||||
<summary>
|
||||
Commit a vertical drop using DragAndDropState.
|
||||
Center on an empty group inserts INTO that group.
|
||||
Top/Bottom on any item inserts as a SIBLING in the parent container.
|
||||
Returns true if the model changed.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.DesignerEditorWindow.HandleWindowMovement(System.Boolean,UnityEngine.Vector2,UnityEditor.EditorWindow,System.Int32)">
|
||||
<summary>
|
||||
Handles the window's linux-like drag behaviour.
|
||||
</summary>
|
||||
<param name="isDragging">Are we currently dragging (provided by the calling window)</param>
|
||||
<param name="dragStartPosition">Where did the drag start (provided by the calling window)</param>
|
||||
<param name="editorWindow">The window to move</param>
|
||||
<param name="controlID">A passive control id to make sure the window keeps getting events while dragging (provided by the calling window)</param>
|
||||
<returns>A bool so the calling window can update its "isDragging" variable and a Vector2 so the calling window can update its "dragStartPosition" variable</returns>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.RefList`1.IndexRef">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<remarks>Does not guarantee stability.</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinInternalDragAndDropUtils">
|
||||
<summary> Temporary. </summary>
|
||||
<warning>This implementation <b>will</b> get refactored.</warning>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields">
|
||||
<summary> Temporary. </summary>
|
||||
<warning>This implementation <b>will</b> get refactored.</warning>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.UnityObjectField(UnityEngine.Rect,UnityEngine.GUIContent,UnityEngine.Object,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty)">
|
||||
<summary>
|
||||
Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window.
|
||||
</summary>
|
||||
<param name="position">Position and size of the field.</param>
|
||||
<param name="label">The label to use, or null if no label should be used.</param>
|
||||
<param name="value">The Unity object.</param>
|
||||
<param name="objectType">The Unity object type. This supports inheritance.</param>
|
||||
<param name="allowSceneObjects">Whether to allow scene objects.</param>
|
||||
<param name="readOnly">Determines if the Field is read-only.</param>
|
||||
<param name="property">Will be used for setting and updating the value, this provides a more consistent way to the handle changes.</param>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.UnityObjectField(System.Object,System.Int32,UnityEngine.Rect,UnityEngine.GUIContent,UnityEngine.Object,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty)">
|
||||
<summary>
|
||||
Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window.
|
||||
</summary>
|
||||
<param name="position">Position and size of the field.</param>
|
||||
<param name="label">The label to use, or null if no label should be used.</param>
|
||||
<param name="value">The Unity object.</param>
|
||||
<param name="objectType">The Unity object type. This supports inheritance.</param>
|
||||
<param name="allowSceneObjects">Whether to allow scene objects.</param>
|
||||
<param name="readOnly">Determines if the Field is read-only.</param>
|
||||
<param name="property">Will be used for setting and updating the value, this provides a more consistent way to the handle changes.</param>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.PolymorphicObjectField(UnityEngine.Rect,System.Int32,System.Boolean,UnityEngine.GUIContent,System.Object,System.Type,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty,System.Boolean,System.Boolean,System.String)">
|
||||
<summary>
|
||||
TODO
|
||||
</summary>
|
||||
<param name="position"></param>
|
||||
<param name="id"></param>
|
||||
<param name="hasKeyboardFocus"></param>
|
||||
<param name="label"></param>
|
||||
<param name="value"></param>
|
||||
<param name="valueType"></param>
|
||||
<param name="baseType"></param>
|
||||
<param name="allowSceneObjects"></param>
|
||||
<param name="disallowNullValues"></param>
|
||||
<param name="property"></param>
|
||||
<param name="readOnly"></param>
|
||||
<param name="showBaseType"></param>
|
||||
<param name="title"></param>
|
||||
<returns></returns>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.PolymorphicObjectField(System.Object,System.Int32,UnityEngine.Rect,System.Int32,System.Boolean,UnityEngine.GUIContent,System.Object,System.Type,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty,System.Boolean,System.Boolean,System.String)">
|
||||
<summary>
|
||||
TODO
|
||||
</summary>
|
||||
<param name="position"></param>
|
||||
<param name="id"></param>
|
||||
<param name="hasKeyboardFocus"></param>
|
||||
<param name="label"></param>
|
||||
<param name="value"></param>
|
||||
<param name="valueType"></param>
|
||||
<param name="baseType"></param>
|
||||
<param name="allowSceneObjects"></param>
|
||||
<param name="disallowNullValues"></param>
|
||||
<param name="property"></param>
|
||||
<param name="readOnly"></param>
|
||||
<param name="showBaseType"></param>
|
||||
<param name="title"></param>
|
||||
<returns></returns>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinObjectSelectorIds">
|
||||
<summary>
|
||||
Contains a set of Unique IDs used for various parts of Odin that don't rely on ControlIds as the ID identifier for OdinObjectSelector.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.TypeSelectorHandler_WILL_BE_DEPRECATED">
|
||||
<summary>
|
||||
Handles instantiating different versions of the Type Selector depending on the context.
|
||||
</summary>
|
||||
<remarks>This handler only handles shared constructors between the two versions, for obsolete or unique constructors use the desired selector.</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.InspectorPropertyInfo">
|
||||
<summary>
|
||||
Contains meta-data information about a property in the inspector, that can be used to create an actual property instance.
|
||||
@@ -2161,56 +2314,6 @@
|
||||
</summary>
|
||||
<param name="reference"></param>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtPath(System.String)">
|
||||
<summary>
|
||||
Gets the property at the given path. Note that this is the path found in <see cref="P:Sirenix.OdinInspector.Editor.InspectorProperty.Path" />, not the Unity path.
|
||||
</summary>
|
||||
<param name="path">The path of the property to get.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtPath(System.String,Sirenix.OdinInspector.Editor.InspectorProperty@)">
|
||||
<summary>
|
||||
Gets the property at the given path. Note that this is the path found in <see cref="P:Sirenix.OdinInspector.Editor.InspectorProperty.Path" />, not the Unity path.
|
||||
</summary>
|
||||
<param name="path">The path of the property to get.</param>
|
||||
<param name="closestProperty"></param>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtUnityPath(System.String)">
|
||||
<summary>
|
||||
Finds the property at the specified unity path.
|
||||
</summary>
|
||||
<param name="path">The unity path for the property.</param>
|
||||
<returns>The property found at the path.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtUnityPath(System.String,Sirenix.OdinInspector.Editor.InspectorProperty@)">
|
||||
<summary>
|
||||
Finds the property at the specified unity path.
|
||||
</summary>
|
||||
<param name="path">The unity path for the property.</param>
|
||||
<param name="closestProperty"></param>
|
||||
<returns>The property found at the path.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtPrefabModificationPath(System.String)">
|
||||
<summary>
|
||||
Finds the property at the specified modification path.
|
||||
</summary>
|
||||
<param name="path">The prefab modification path for the property.</param>
|
||||
<returns>The property found at the path.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetPropertyAtPrefabModificationPath(System.String,Sirenix.OdinInspector.Editor.InspectorProperty@)">
|
||||
<summary>
|
||||
Finds the property at the specified modification path.
|
||||
</summary>
|
||||
<param name="path">The prefab modification path for the property.</param>
|
||||
<param name="closestProperty"></param>
|
||||
<returns>The property found at the path.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.GetUnityPropertyForPath(System.String,System.Reflection.FieldInfo@)">
|
||||
<summary>
|
||||
Gets a Unity property for the given Odin or Unity path. If there is no <see cref="T:UnityEditor.SerializedObject" /> for this property tree, or no such property is found in the <see cref="T:UnityEditor.SerializedObject" />, a property will be emitted using <see cref="T:Sirenix.OdinInspector.Editor.UnityPropertyEmitter" />.
|
||||
</summary>
|
||||
<param name="path">The Odin or Unity path to the property to get.</param>
|
||||
<param name="backingField">The backing field of the Unity property.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.PropertyTree`1.EnumerateTree(System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Enumerates over the properties of the tree. WARNING: For tree that have large targets with lots of data, this may involve massive amounts of work as the full tree structure is resolved. USE THIS METHOD SPARINGLY AND ONLY WHEN ABSOLUTELY NECESSARY!
|
||||
@@ -2513,6 +2616,15 @@
|
||||
For now, it only exists to denote which internally defined resolvers support prefab modifications being set.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.OdinCacheableProcessorAttribute">
|
||||
<summary>
|
||||
Marks an <see cref="T:Sirenix.OdinInspector.Editor.OdinAttributeProcessor"/> or <see cref="T:Sirenix.OdinInspector.Editor.OdinPropertyProcessor"/> as cacheable.
|
||||
</summary>
|
||||
<remarks>
|
||||
Only mark a processor as cacheable if it always produces the same attributes for the same properties in the same order.
|
||||
Caching is applied only when all processors that run on a property are cacheable; if any running processor is not, the result will not be cached.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.CollectionChangeInfo">
|
||||
<summary>
|
||||
Contains information about a change that is going to occur/has occurred to a collection.
|
||||
@@ -7154,135 +7266,6 @@
|
||||
Preview object of the example.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.HasAssociatedData(System.Int32)">
|
||||
<summary>
|
||||
Checks whether the allocated <see cref="T:UnityEngine.Rect"/> has data associated with it.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to check.</param>
|
||||
<returns><c>true</c> if the <see cref="T:UnityEngine.Rect"/> has data associated with it; otherwise <c>false</c>.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetAssociatedData(System.Int32)">
|
||||
<summary>
|
||||
Gets the data associated with the <see cref="T:UnityEngine.Rect"/> at the given <paramref name="index"/>; this is the second parameter assigned in the <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/> method.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to retrieve the associated data from.</param>
|
||||
<returns>The associated data.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetAssociatedData``1(System.Int32)">
|
||||
<summary>
|
||||
Gets the data associated with the <see cref="T:UnityEngine.Rect"/> at the given <see cref="!:index"/>; this is the second parameter assigned in the <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/> method.
|
||||
</summary>
|
||||
<param name="index">The index of the <see cref="T:UnityEngine.Rect"/> to retrieve the associated data from.</param>
|
||||
<typeparam name="T">The expected associated data type.</typeparam>
|
||||
<returns>The associated data.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetIndentation(System.Int32)">
|
||||
<summary>
|
||||
Gets the indentation set for the <see cref="T:UnityEngine.Rect"/> at the given <paramref name="index"/>.
|
||||
</summary>
|
||||
<param name="index">The <paramref name="index"/> of the <see cref="T:UnityEngine.Rect"/> to retrieve the indentation for.</param>
|
||||
<returns>The indentation for the <see cref="T:UnityEngine.Rect"/>.</returns>
|
||||
<remarks>The indentation is set using <see cref="F:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.Indentation"/> during <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.BeginAllocations"/> and <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.EndAllocations"/>.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.VisibleItems.GetCombinedRects">
|
||||
<summary>
|
||||
Creates a <see cref="T:UnityEngine.Rect"/> representing all the visible <see cref="T:UnityEngine.Rect"/>'s combined.
|
||||
</summary>
|
||||
<returns>The created <see cref="T:UnityEngine.Rect"/>.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)">
|
||||
<summary>
|
||||
Allocates an <see cref="T:UnityEngine.Rect"/> in the view, with the option to associate a given <see cref="T:System.Object"/> with it.
|
||||
</summary>
|
||||
<param name="height"></param>
|
||||
<param name="reference"></param>
|
||||
<remarks>Ensure <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.BeginAllocations"/> is called before calling this, and ensure <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.EndAllocations"/> is called after you're done with <see cref="M:Sirenix.OdinInspector.Editor.Internal.OdinGUIScrollView.AllocateRect(System.Single,System.Object)"/></remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinInternalDragAndDropUtils">
|
||||
<summary> Temporary. </summary>
|
||||
<warning>This implementation <b>will</b> get refactored.</warning>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields">
|
||||
<summary> Temporary. </summary>
|
||||
<warning>This implementation <b>will</b> get refactored.</warning>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.UnityObjectField(UnityEngine.Rect,UnityEngine.GUIContent,UnityEngine.Object,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty)">
|
||||
<summary>
|
||||
Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window.
|
||||
</summary>
|
||||
<param name="position">Position and size of the field.</param>
|
||||
<param name="label">The label to use, or null if no label should be used.</param>
|
||||
<param name="value">The Unity object.</param>
|
||||
<param name="objectType">The Unity object type. This supports inheritance.</param>
|
||||
<param name="allowSceneObjects">Whether to allow scene objects.</param>
|
||||
<param name="readOnly">Determines if the Field is read-only.</param>
|
||||
<param name="property">Will be used for setting and updating the value, this provides a more consistent way to the handle changes.</param>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.UnityObjectField(System.Object,System.Int32,UnityEngine.Rect,UnityEngine.GUIContent,UnityEngine.Object,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty)">
|
||||
<summary>
|
||||
Draws a regular Unity ObjectField, but supports labels being nulls, and also adds a small button that will open the object in a new inspector window.
|
||||
</summary>
|
||||
<param name="position">Position and size of the field.</param>
|
||||
<param name="label">The label to use, or null if no label should be used.</param>
|
||||
<param name="value">The Unity object.</param>
|
||||
<param name="objectType">The Unity object type. This supports inheritance.</param>
|
||||
<param name="allowSceneObjects">Whether to allow scene objects.</param>
|
||||
<param name="readOnly">Determines if the Field is read-only.</param>
|
||||
<param name="property">Will be used for setting and updating the value, this provides a more consistent way to the handle changes.</param>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.PolymorphicObjectField(UnityEngine.Rect,System.Int32,System.Boolean,UnityEngine.GUIContent,System.Object,System.Type,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty,System.Boolean,System.Boolean,System.String)">
|
||||
<summary>
|
||||
TODO
|
||||
</summary>
|
||||
<param name="position"></param>
|
||||
<param name="id"></param>
|
||||
<param name="hasKeyboardFocus"></param>
|
||||
<param name="label"></param>
|
||||
<param name="value"></param>
|
||||
<param name="valueType"></param>
|
||||
<param name="baseType"></param>
|
||||
<param name="allowSceneObjects"></param>
|
||||
<param name="disallowNullValues"></param>
|
||||
<param name="property"></param>
|
||||
<param name="readOnly"></param>
|
||||
<param name="showBaseType"></param>
|
||||
<param name="title"></param>
|
||||
<returns></returns>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.Internal.OdinInternalEditorFields.PolymorphicObjectField(System.Object,System.Int32,UnityEngine.Rect,System.Int32,System.Boolean,UnityEngine.GUIContent,System.Object,System.Type,System.Type,System.Boolean,System.Boolean,Sirenix.OdinInspector.Editor.InspectorProperty,System.Boolean,System.Boolean,System.String)">
|
||||
<summary>
|
||||
TODO
|
||||
</summary>
|
||||
<param name="position"></param>
|
||||
<param name="id"></param>
|
||||
<param name="hasKeyboardFocus"></param>
|
||||
<param name="label"></param>
|
||||
<param name="value"></param>
|
||||
<param name="valueType"></param>
|
||||
<param name="baseType"></param>
|
||||
<param name="allowSceneObjects"></param>
|
||||
<param name="disallowNullValues"></param>
|
||||
<param name="property"></param>
|
||||
<param name="readOnly"></param>
|
||||
<param name="showBaseType"></param>
|
||||
<param name="title"></param>
|
||||
<returns></returns>
|
||||
<remarks>If a property is assigned through the parameters, the return value should not be used for setting the <see cref="T:Sirenix.OdinInspector.Editor.PropertyValueEntry`1"/>, the drawer will handle that.</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.OdinObjectSelectorIds">
|
||||
<summary>
|
||||
Contains a set of Unique IDs used for various parts of Odin that don't rely on ControlIds as the ID identifier for OdinObjectSelector.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.Internal.TypeSelectorHandler_WILL_BE_DEPRECATED">
|
||||
<summary>
|
||||
Handles instantiating different versions of the Type Selector depending on the context.
|
||||
</summary>
|
||||
<remarks>This handler only handles shared constructors between the two versions, for obsolete or unique constructors use the desired selector.</remarks>
|
||||
</member>
|
||||
<member name="T:Sirenix.OdinInspector.Editor.AllowGUIEnabledForReadonlyAttribute">
|
||||
<summary>
|
||||
Some drawers don't want to have its GUI disabled, even if the property is read-only or a ReadOnly attribute is defined on the property.
|
||||
@@ -10206,6 +10189,36 @@
|
||||
Sets the selected types.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.OdinVisualDesignerConfig.ToggleFavorite(System.Type)">
|
||||
<returns>The favorite state *after* toggling.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.OdinVisualDesigner.OpenForType(System.Type)">
|
||||
<summary>
|
||||
Opens the Visual Designer for the specified <see cref="T:System.Type"/>.
|
||||
</summary>
|
||||
<param name="type">The type to display and customize in the Visual Designer.</param>
|
||||
<returns>
|
||||
The opened <see cref="T:Sirenix.OdinInspector.Editor.OdinEditorWindow"/>, or <c>null</c> if the window could not be opened.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.OdinVisualDesigner.OpenForInstance(System.Object)">
|
||||
<summary>
|
||||
Opens the Visual Designer for the specified object instance.
|
||||
</summary>
|
||||
<param name="instance">The object instance to display and customize in the Visual Designer.</param>
|
||||
<returns>
|
||||
The opened <see cref="T:Sirenix.OdinInspector.Editor.OdinEditorWindow"/>, or <c>null</c> if the window could not be opened or the instance was <c>null</c>.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.OdinInspector.Editor.OdinVisualDesigner.OpenForProperty(Sirenix.OdinInspector.Editor.InspectorProperty)">
|
||||
<summary>
|
||||
Opens the Visual Designer for the specified <see cref="T:Sirenix.OdinInspector.Editor.InspectorProperty"/>.
|
||||
</summary>
|
||||
<param name="property">The property to display and customize in the Visual Designer.</param>
|
||||
<returns>
|
||||
The opened <see cref="T:Sirenix.OdinInspector.Editor.OdinEditorWindow"/>, or <c>null</c> if the window could not be opened.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="P:Sirenix.OdinInspector.Editor.OdinObjectSelector.SelectorProperty">
|
||||
<summary>
|
||||
The <see cref="T:Sirenix.OdinInspector.Editor.InspectorProperty"/> that was used in the last 'Show' call.
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -6931,6 +6931,24 @@
|
||||
<param name="messageBoxStyle">The style of the message box.</param>
|
||||
<param name="wide">If set to <c>true</c> the message box will be wide.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.Editor.SirenixEditorGUI.MessageBox(System.String,UnityEditor.MessageType,System.Int32)">
|
||||
<summary>
|
||||
Draws a message box with a configurable font size.
|
||||
</summary>
|
||||
<param name="message">The message.</param>
|
||||
<param name="messageType">Type of the message.</param>
|
||||
<param name="fontSize">The font size of the text. This also affects the size of the icon.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.Editor.SirenixEditorGUI.MessageBox(System.String,Sirenix.OdinInspector.SdfIconType,UnityEngine.Color,System.Int32,System.Action{UnityEditor.GenericMenu})">
|
||||
<summary>
|
||||
Draws a message box with a configurable font size.
|
||||
</summary>
|
||||
<param name="message">The message.</param>
|
||||
<param name="icon">The SDF icon to draw next to the message.</param>
|
||||
<param name="iconColor">The color of the SDF icon.</param>
|
||||
<param name="fontSize">The font size of the text. This also affects the size of the icon.</param>
|
||||
<param name="onContextClick">The action to be invoked if the message box is right-clicked.</param>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.Editor.SirenixEditorGUI.DetailedMessageBox(System.String,System.String,UnityEditor.MessageType,System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Draws a message box that can be expanded to show more details.
|
||||
@@ -6942,6 +6960,17 @@
|
||||
<param name="wide">If set to <c>true</c> the message box will be wide.</param>
|
||||
<returns>State of isFolded.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.Editor.SirenixEditorGUI.DetailedMessageBox(System.String,System.String,UnityEditor.MessageType,System.Boolean,System.Int32)">
|
||||
<summary>
|
||||
Draws a message box that can be expanded to show more details.
|
||||
</summary>
|
||||
<param name="message">The message of the message box.</param>
|
||||
<param name="detailedMessage">The detailed message of the message box.</param>
|
||||
<param name="messageType">Type of the message box.</param>
|
||||
<param name="hideDetailedMessage">If set to <c>true</c> the detailed message is hidden.</param>
|
||||
<param name="fontSize">The font size of the text. This also affects the size of the icon.</param>
|
||||
<returns>State of isFolded.</returns>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.Editor.SirenixEditorGUI.IconMessageBox(System.String,Sirenix.OdinInspector.SdfIconType,System.Nullable{UnityEngine.Color},UnityEngine.GUIStyle,System.Action{UnityEditor.GenericMenu})">
|
||||
<summary>
|
||||
Draws a message box with the specified icon.
|
||||
@@ -7886,7 +7915,7 @@
|
||||
Creates a rect that can be grabbed and pulled to change a value up or down.
|
||||
</summary>
|
||||
<param name="rect">The grabbable rect.</param>
|
||||
<param name="id">The control ID for the sliding.</param>
|
||||
<param name="controlId">The control ID for the sliding.</param>
|
||||
<param name="t">The current value.</param>
|
||||
<returns>
|
||||
The current value.
|
||||
@@ -9381,6 +9410,20 @@
|
||||
Indicates whether the UnitInfo should use the <c>multiplier</c> or the <c>ConvertFromBase</c> and <c>ConvertToBase</c> methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Sirenix.Utilities.Editor.UnityShims">
|
||||
<summary>
|
||||
<para>
|
||||
This is an internal class that is used solely in pre-built assembly versions of Odin, not in source distributions.
|
||||
Some Unity API's differ in different versions of the engine, like the Color, Color32, Rect and Vector2/3/4 structs.
|
||||
This class contains replacements or reimplementations of these Unity APIs. This class should not be used directly.
|
||||
</para>
|
||||
<para>
|
||||
At build time, Odin's assemblies are IL post-processed to redirect all relevant calls with shims into the implementations
|
||||
here instead of using the Unity versions of these APIs, such that Odin's pre-built assemblies work across a wide
|
||||
range of Unity versions.
|
||||
</para>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Sirenix.Utilities.AssemblyTypeFlags">
|
||||
<summary>
|
||||
AssemblyTypeFlags is a bitmask used to filter types and assemblies related to Unity.
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
Binary file not shown.
@@ -48,6 +48,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -1758,14 +1758,25 @@
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.TypeExtensions.FindIdealConstructor(System.Type,System.Reflection.BindingFlags)">
|
||||
<summary>
|
||||
Weighs multiple constructors for a given type, and attempts to find the most ideal constructor. This will ignore any unmanaged constructors.
|
||||
Finds the constructor of a type that is closest to a default constructor while favoring safer options.
|
||||
Unmanaged constructors are ignored.
|
||||
</summary>
|
||||
<param name="type">The <see cref="T:System.Type"/> to weigh the constructors of.</param>
|
||||
<param name="flags">The <see cref="T:System.Reflection.BindingFlags"/> to search for the constructors; <see cref="F:System.Reflection.BindingFlags.Default"/> means only find the public ones.</param>
|
||||
<returns>The most ideal <see cref="T:System.Reflection.ConstructorInfo"/> based on the scoring system.</returns>
|
||||
<remarks>The scoring system prefers value types over reference types (adjusted for default values),
|
||||
it provides bonuses for empty constructors or constructors solely consisting of default values.
|
||||
Lastly it considers the amount of parameters present in the constructor in the overall score. </remarks>
|
||||
<param name="type">The <see cref="T:System.Type"/> whose constructors are evaluated.</param>
|
||||
<param name="flags">
|
||||
The <see cref="T:System.Reflection.BindingFlags"/> to use when retrieving constructors.
|
||||
<see cref="F:System.Reflection.BindingFlags.Default"/> restricts the search to public constructors.
|
||||
</param>
|
||||
<returns>
|
||||
The <see cref="T:System.Reflection.ConstructorInfo"/> considered closest to a default constructor based on the ranking heuristics.
|
||||
</returns>
|
||||
<remarks>
|
||||
<p>Constructors are ranked using these heuristics:</p>
|
||||
<p>1. Empty constructors are preferred first.</p>
|
||||
<p>2. Constructors where all parameters have default values are preferred next.</p>
|
||||
<p>3. Shorter constructors are preferred over longer ones.</p>
|
||||
<p>4. Constructors with more parameters that have default values are preferred.</p>
|
||||
<p>5. Constructors with more value-type parameters are preferred.</p>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Sirenix.Utilities.TypeExtensions.IsUnmanagedCtor(System.Reflection.ConstructorInfo)">
|
||||
<summary>
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Assemblies/link.xml
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -10,6 +10,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Hidden/ExtractSpriteShader.shader
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Hidden/GUIUtilShader.shader
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Hidden/LazyEditorIconShader.shader
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Hidden/SdfIconShader.shader
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -10,6 +10,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -130,6 +130,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 240468018, guid: a4865f1ab4504ed8a368670db22f409c, type: 3}
|
||||
m_Name: OdinVisualDesignerConfig
|
||||
m_EditorClassIdentifier: Sirenix.OdinInspector.Editor.dll::Sirenix.OdinInspector.Editor.OdinVisualDesignerConfig
|
||||
SerializedFavoriteAttributes: []
|
||||
savePath: Assets/Plugins/Sirenix/Odin Inspector/Visual Designer/Saved
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d90d8f7139103f48bb4e7c20d71ed55
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.data
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -10,6 +10,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -8,6 +8,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -10,6 +10,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6d35142996ac8c4f8feafe65c2a3344
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3630cf5ced5b70c44914a32581f96420
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,6 +10,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89041
|
||||
packageName: Odin Inspector and Serializer
|
||||
packageVersion: 3.3.1.10
|
||||
packageVersion: 4.0.1.2
|
||||
assetPath: Assets/Plugins/Sirenix/Readme.txt
|
||||
uploadId: 702916
|
||||
uploadId: 835510
|
||||
|
||||
3412
Assets/Scenes/StyleTest.unity
Normal file
3412
Assets/Scenes/StyleTest.unity
Normal file
File diff suppressed because one or more lines are too long
7
Assets/Scenes/StyleTest.unity.meta
Normal file
7
Assets/Scenes/StyleTest.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64e3d0faba98b4b43bd732f3184f78bd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -22,6 +22,140 @@ MonoBehaviour:
|
||||
gain:
|
||||
m_OverrideState: 1
|
||||
m_Value: {x: 1, y: 1, z: 1, w: 0}
|
||||
--- !u!114 &-8948300373973170368
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f17acff6deb4f089d110375635d4e37, type: 3}
|
||||
m_Name: HTraceSSGIVolume
|
||||
m_EditorClassIdentifier: HTraceSSGI::HTraceSSGI.Scripts.Infrastructure.URP.HTraceSSGIVolume
|
||||
active: 1
|
||||
Enable:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
DebugMode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
HBuffer:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
ExcludeCastingMask:
|
||||
m_OverrideState: 1
|
||||
m_Value:
|
||||
serializedVersion: 0
|
||||
m_Bits: 0
|
||||
ExcludeReceivingMask:
|
||||
m_OverrideState: 1
|
||||
m_Value:
|
||||
serializedVersion: 0
|
||||
m_Bits: 0
|
||||
FallbackType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
SkyIntensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.5
|
||||
ViewBias:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.1
|
||||
NormalBias:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
SamplingNoise:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.1
|
||||
IntensityMultiplier:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
DenoiseFallback:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
MetallicIndirectFallback:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
AmbientOverride:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
Multibounce:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
BackfaceLighting:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
MaxRayLength:
|
||||
m_OverrideState: 1
|
||||
m_Value: 100
|
||||
ThicknessMode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
Thickness:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.35
|
||||
Intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
Falloff:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
RayCount:
|
||||
m_OverrideState: 1
|
||||
m_Value: 3
|
||||
StepCount:
|
||||
m_OverrideState: 1
|
||||
m_Value: 24
|
||||
RefineIntersection:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
FullResolutionDepth:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
Checkerboard:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
RenderScale:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
BrightnessClamp:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
MaxValueBrightnessClamp:
|
||||
m_OverrideState: 1
|
||||
m_Value: 7
|
||||
MaxDeviationBrightnessClamp:
|
||||
m_OverrideState: 1
|
||||
m_Value: 3
|
||||
HalfStepValidation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
SpatialOcclusionValidation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
TemporalLightingValidation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
TemporalOcclusionValidation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
SpatialRadius:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.6
|
||||
Adaptivity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.9
|
||||
RecurrentBlur:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
FireflySuppression:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
ShowBowels:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
--- !u!114 &-8270506406425502121
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
@@ -465,6 +599,7 @@ MonoBehaviour:
|
||||
- {fileID: -6288072647309666549}
|
||||
- {fileID: 7518938298396184218}
|
||||
- {fileID: -1410297666881709256}
|
||||
- {fileID: -8948300373973170368}
|
||||
--- !u!114 &853819529557874667
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
|
||||
@@ -12,8 +12,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: Mobile_RPAsset
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 12
|
||||
k_AssetPreviousVersion: 12
|
||||
k_AssetVersion: 13
|
||||
k_AssetPreviousVersion: 13
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
@@ -53,6 +53,7 @@ MonoBehaviour:
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 1024
|
||||
m_ReflectionProbeBlending: 1
|
||||
m_ReflectionProbeBoxProjection: 1
|
||||
m_ReflectionProbeAtlas: 1
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 1
|
||||
m_Cascade2Split: 0.25
|
||||
@@ -127,8 +128,14 @@ MonoBehaviour:
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterScreenSpaceIrradiance: 0
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_PrefilterUseLegacyLightmaps: 0
|
||||
m_PrefilterBicubicLightmapSampling: 0
|
||||
m_PrefilterReflectionProbeRotation: 0
|
||||
m_PrefilterReflectionProbeBlending: 0
|
||||
m_PrefilterReflectionProbeBoxProjection: 0
|
||||
m_PrefilterReflectionProbeAtlas: 0
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
m_Textures:
|
||||
|
||||
@@ -12,8 +12,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: PC_RPAsset
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 12
|
||||
k_AssetPreviousVersion: 12
|
||||
k_AssetVersion: 13
|
||||
k_AssetPreviousVersion: 13
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
@@ -128,9 +128,11 @@ MonoBehaviour:
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterScreenSpaceIrradiance: 0
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_PrefilterUseLegacyLightmaps: 0
|
||||
m_PrefilterBicubicLightmapSampling: 1
|
||||
m_PrefilterReflectionProbeRotation: 0
|
||||
m_PrefilterReflectionProbeBlending: 0
|
||||
m_PrefilterReflectionProbeBoxProjection: 0
|
||||
m_PrefilterReflectionProbeAtlas: 0
|
||||
|
||||
@@ -41,7 +41,7 @@ MonoBehaviour:
|
||||
m_RendererFeatures:
|
||||
- {fileID: 7833122117494664109}
|
||||
- {fileID: -6289278183109882122}
|
||||
m_RendererFeatureMap: ad6b866f10d7b46c
|
||||
m_RendererFeatureMap: ad6b866f10d7b46cf60e1f82d0feb7a8
|
||||
m_UseNativeRenderPass: 1
|
||||
xrSystemData: {fileID: 0}
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
@@ -64,10 +64,10 @@ MonoBehaviour:
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
m_RenderingMode: 2
|
||||
m_DepthPrimingMode: 0
|
||||
m_DepthPrimingMode: 1
|
||||
m_CopyDepthMode: 0
|
||||
m_DepthAttachmentFormat: 0
|
||||
m_DepthTextureFormat: 90
|
||||
m_DepthTextureFormat: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 0
|
||||
--- !u!114 &7833122117494664109
|
||||
@@ -89,10 +89,10 @@ MonoBehaviour:
|
||||
AfterOpaque: 0
|
||||
Source: 1
|
||||
NormalSamples: 1
|
||||
Intensity: 0.4
|
||||
DirectLightingStrength: 0.25
|
||||
Radius: 0.3
|
||||
Intensity: 1.42
|
||||
DirectLightingStrength: 0.43
|
||||
Radius: 4.2
|
||||
Samples: 1
|
||||
BlurQuality: 0
|
||||
Falloff: 100
|
||||
Falloff: 53.1
|
||||
SampleCount: -1
|
||||
|
||||
@@ -62,23 +62,12 @@ MonoBehaviour:
|
||||
- rid: 2028245633001062405
|
||||
- rid: 2028245633001062406
|
||||
- rid: 2028245633001062407
|
||||
- rid: 4765301144542773248
|
||||
- rid: 4765301144542773249
|
||||
- rid: 4765301144542773250
|
||||
m_RuntimeSettings:
|
||||
m_List:
|
||||
- rid: 6852985685364965378
|
||||
- rid: 6852985685364965379
|
||||
- rid: 6852985685364965380
|
||||
- rid: 6852985685364965381
|
||||
- rid: 6852985685364965384
|
||||
- rid: 6852985685364965385
|
||||
- rid: 6852985685364965392
|
||||
- rid: 6852985685364965394
|
||||
- rid: 8712630790384254976
|
||||
- rid: 1219305102947385344
|
||||
- rid: 2028245633001062401
|
||||
- rid: 2028245633001062403
|
||||
- rid: 2028245633001062406
|
||||
- rid: 2028245633001062407
|
||||
m_AssetVersion: 8
|
||||
m_List: []
|
||||
m_AssetVersion: 9
|
||||
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
||||
m_RenderingLayerNames:
|
||||
- Light Layer default
|
||||
@@ -241,6 +230,29 @@ MonoBehaviour:
|
||||
data:
|
||||
m_Version: 1
|
||||
m_UseBicubicLightmapSampling: 0
|
||||
- rid: 4765301144542773248
|
||||
type: {class: RayTracingRenderPipelineResources, ns: UnityEngine.Rendering.UnifiedRayTracing, asm: Unity.UnifiedRayTracing.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
m_GeometryPoolKernels: {fileID: 7200000, guid: 98e3d58cae7210c4786f67f504c9e899, type: 3}
|
||||
m_CopyBuffer: {fileID: 7200000, guid: 1b95b5dcf48d1914c9e1e7405c7660e3, type: 3}
|
||||
m_CopyPositions: {fileID: 7200000, guid: 1ad53a96b58d3c3488dde4f14db1aaeb, type: 3}
|
||||
m_BitHistogram: {fileID: 7200000, guid: 8670f7ce4b60cef43bed36148aa1b0a2, type: 3}
|
||||
m_BlockReducePart: {fileID: 7200000, guid: 4e034cc8ea2635c4e9f063e5ddc7ea7a, type: 3}
|
||||
m_BlockScan: {fileID: 7200000, guid: 4d6d5de35fa45ef4a92119397a045cc9, type: 3}
|
||||
m_BuildHlbvh: {fileID: 7200000, guid: 2d70cd6be91bd7843a39a54b51c15b13, type: 3}
|
||||
m_RestructureBvh: {fileID: 7200000, guid: 56641cb88dcb31a4398a4997ef7a7a8c, type: 3}
|
||||
m_Scatter: {fileID: 7200000, guid: a2eaeefdac4637a44b734e85b7be9186, type: 3}
|
||||
- rid: 4765301144542773249
|
||||
type: {class: OnTilePostProcessResource, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
m_UberPostShader: {fileID: 4800000, guid: fe4f13c1004a07d4ea1e30bfd0326d9e, type: 3}
|
||||
- rid: 4765301144542773250
|
||||
type: {class: URPReflectionProbeSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
version: 1
|
||||
useReflectionProbeRotation: 0
|
||||
- rid: 6852985685364965376
|
||||
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
@@ -302,11 +314,11 @@ MonoBehaviour:
|
||||
m_SpriteUnshadowShader: {fileID: 4800000, guid: de02b375720b5c445afe83cd483bedf3, type: 3}
|
||||
m_GeometryShadowShader: {fileID: 4800000, guid: 19349a0f9a7ed4c48a27445bcf92e5e1, type: 3}
|
||||
m_GeometryUnshadowShader: {fileID: 4800000, guid: 77774d9009bb81447b048c907d4c6273, type: 3}
|
||||
m_FallOffLookup: {fileID: 2800000, guid: 5688ab254e4c0634f8d6c8e0792331ca, type: 3}
|
||||
m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
|
||||
m_DefaultMesh2DLitMaterial: {fileID: 2100000, guid: 9452ae1262a74094f8a68013fbcd1834, type: 2}
|
||||
- rid: 6852985685364965383
|
||||
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
internal static class CliUtils {
|
||||
@@ -66,8 +67,14 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
|
||||
public static string GetExecutableTargetDir() {
|
||||
if (PackageConst.IsAssetStoreBuild) {
|
||||
if (PackageConst.DefaultLocaleField == Locale.SimplifiedChinese) {
|
||||
return Path.Combine(GetAppDataPath(), "asset-store", "zh", $"executables_{PackageConst.ServerVersion.Replace('.', '-')}");
|
||||
}
|
||||
return Path.Combine(GetAppDataPath(), "asset-store", $"executables_{PackageConst.ServerVersion.Replace('.', '-')}");
|
||||
}
|
||||
if (PackageConst.DefaultLocaleField == Locale.SimplifiedChinese) {
|
||||
return Path.Combine(GetAppDataPath(), "zh", $"executables_{PackageConst.ServerVersion.Replace('.', '-')}");
|
||||
}
|
||||
return Path.Combine(GetAppDataPath(), $"executables_{PackageConst.ServerVersion.Replace('.', '-')}");
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,11 @@ using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
#endif
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
[InitializeOnLoad]
|
||||
@@ -73,10 +76,9 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
static bool TryGetStartArgs(string dataPath, bool exposeServerToNetwork, bool allAssetChanges, bool createNoWindow, bool isReleaseMode, bool detailedErrorReporting, LoginData loginData, int port, out StartArgs args) {
|
||||
string serverDir;
|
||||
if(!CliUtils.TryFindServerDir(out serverDir)) {
|
||||
Log.Warning($"Failed to start the Hot Reload Server. " +
|
||||
$"Unable to locate the 'Server' directory. " +
|
||||
$"Make sure the 'Server' directory is " +
|
||||
$"somewhere in the Assets folder inside a 'HotReload' folder or in the HotReload package");
|
||||
Log.Warning(string.Format(Translations.Errors.WarningFailedToStartServer,
|
||||
Translations.Utility.UnableToLocateServer +
|
||||
Translations.Utility.UnableToLocateServerDetail));
|
||||
args = null;
|
||||
return false;
|
||||
}
|
||||
@@ -100,11 +102,11 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
var info = new DirectoryInfo(Path.GetFullPath("."));
|
||||
slnPath = Path.Combine(Path.GetFullPath("."), info.Name + ".sln");
|
||||
if (!File.Exists(slnPath)) {
|
||||
Log.Warning($"Failed to start the Hot Reload Server. Cannot find solution file. Please disable \"useBuiltInProjectGeneration\" in settings to enable custom project generation.");
|
||||
Log.Warning(string.Format(Translations.Errors.WarningFailedToStartServer, Translations.Utility.CannotFindSolutionFile));
|
||||
args = null;
|
||||
return false;
|
||||
}
|
||||
Log.Info("Using default project generation. If you encounter any problem with Unity's default project generation consider disabling it to use custom project generation.");
|
||||
Log.Info(Translations.Errors.InfoDefaultProjectGeneration);
|
||||
try {
|
||||
Directory.Delete(ProjectGeneration.ProjectGeneration.tempDir, true);
|
||||
} catch(Exception ex) {
|
||||
@@ -115,7 +117,7 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
}
|
||||
|
||||
if (!File.Exists(slnPath)) {
|
||||
Log.Warning($"No .sln file found. Open any c# file to generate it so Hot Reload can work properly");
|
||||
Log.Warning(Translations.Errors.WarningNoSlnFileFound);
|
||||
}
|
||||
|
||||
var searchAssemblies = string.Join(";", CodePatcher.I.GetAssemblySearchPaths());
|
||||
@@ -207,10 +209,10 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
PrepareBuildInfo(buildInfo);
|
||||
} catch (Exception e) {
|
||||
if (!didLogWarning) {
|
||||
Log.Warning($"Preparing build info failed! On-device functionality might not work. Exception: {e}");
|
||||
Log.Warning(string.Format(Translations.Errors.WarningPreparingBuildInfoFailed, e));
|
||||
didLogWarning = true;
|
||||
} else {
|
||||
Log.Debug($"Preparing build info failed! On-device functionality might not work. Exception: {e}");
|
||||
Log.Debug(string.Format(Translations.Utility.PreparingBuildInfoFailed, e));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
@@ -45,7 +46,7 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
if (File.Exists(cliargsfile)) {
|
||||
File.Delete(cliargsfile);
|
||||
}
|
||||
throw new Exception("Could not start code patcher process.");
|
||||
throw new Exception(Translations.Errors.ExceptionCouldNotStartCodePatcher);
|
||||
}
|
||||
codePatcherProc.BeginErrorReadLine();
|
||||
codePatcherProc.BeginOutputReadLine();
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Editor.Semver;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
@@ -38,7 +39,7 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
return macosVersion;
|
||||
}
|
||||
// should never happen
|
||||
Log.Warning("Failed to detect MacOS version, if Hot Reload fails to start, please contact support.");
|
||||
Log.Warning(Translations.Errors.WarningMacOSVersionDetectionFailed);
|
||||
return SemVersion.None;
|
||||
});
|
||||
|
||||
@@ -84,6 +85,10 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
Arguments = args.cliArguments,
|
||||
UseShellExecute = false,
|
||||
});
|
||||
|
||||
var pidFilePath = CliUtils.GetPidFilePath(args.hotreloadTempDir);
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
File.WriteAllText(pidFilePath, process.Id.ToString());
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
@@ -114,14 +119,14 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
|
||||
if (process.WaitForExit(1000)) {
|
||||
if (process.ExitCode != 0) {
|
||||
Log.Warning("Failed to the run the start server command. ExitCode={0}\nFilepath: {1}", process.ExitCode, executableScriptPath);
|
||||
Log.Warning(Translations.Errors.WarningFailedToRunServerCommand, process.ExitCode, executableScriptPath);
|
||||
}
|
||||
}
|
||||
else {
|
||||
process.EnableRaisingEvents = true;
|
||||
process.Exited += (_, __) => {
|
||||
if (process.ExitCode != 0) {
|
||||
Log.Warning("Failed to the run the start server command. ExitCode={0}\nFilepath: {1}", process.ExitCode, executableScriptPath);
|
||||
Log.Warning(Translations.Errors.WarningFailedToRunServerCommand, process.ExitCode, executableScriptPath);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -141,11 +146,11 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
static void UnzipMacOsPackage(string zipPath, string unzippedFolderPath) {
|
||||
//Log.Info("UnzipMacOsPackage called with {0}\n workingDirectory = {1}", zipPath, unzippedFolderPath);
|
||||
if (!zipPath.EndsWith(".zip")) {
|
||||
throw new ArgumentException($"Expected to end with .zip, but it was: {zipPath}", nameof(zipPath));
|
||||
throw new ArgumentException(string.Format(Translations.Errors.ExceptionExpectedZipFile, zipPath), nameof(zipPath));
|
||||
}
|
||||
|
||||
if (!File.Exists(zipPath)) {
|
||||
throw new ArgumentException($"zip file not found {zipPath}", nameof(zipPath));
|
||||
throw new ArgumentException(string.Format(Translations.Errors.ExceptionZipFileNotFound, zipPath), nameof(zipPath));
|
||||
}
|
||||
var processStartInfo = new ProcessStartInfo {
|
||||
FileName = "unzip",
|
||||
@@ -158,7 +163,7 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
Process process = Process.Start(processStartInfo);
|
||||
process.WaitForExit();
|
||||
if (process.ExitCode != 0) {
|
||||
throw new Exception($"unzip failed with ExitCode {process.ExitCode}");
|
||||
throw new Exception(string.Format(Translations.Errors.ExceptionUnzipFailed, process.ExitCode));
|
||||
}
|
||||
//Log.Info($"did unzip to {unzippedFolderPath}");
|
||||
// Move the .app folder to unzippedFolderPath
|
||||
@@ -181,7 +186,7 @@ namespace SingularityGroup.HotReload.Editor.Cli {
|
||||
}
|
||||
|
||||
if (!done) {
|
||||
throw new Exception("Failed to find .app directory and move it to " + destDir);
|
||||
throw new Exception(string.Format(Translations.Errors.ExceptionFailedToFindAppDirectory, destDir));
|
||||
}
|
||||
//Log.Info($"did unzip to {unzippedFolderPath}");
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Compilation;
|
||||
using UnityEngine;
|
||||
@@ -30,7 +31,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
} catch(FileNotFoundException) {
|
||||
//file doesn't exist -> no recompile required
|
||||
} catch(Exception ex) {
|
||||
Log.Warning("compile checker encountered issue: {0} {1}", ex.GetType().Name, ex.Message);
|
||||
Log.Warning(Translations.Errors.WarningCompileCheckerIssue, ex.GetType().Name, ex.Message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
internal static class Constants {
|
||||
public const string WebsiteURL = "https://hotreload.net";
|
||||
|
||||
public const string WebsiteURL = PackageConst.DefaultLocale == Locale.SimplifiedChinese ?
|
||||
"https://hotreload.net/zh" :
|
||||
"https://hotreload.net";
|
||||
public const string ProductPurchaseURL = WebsiteURL + "/pricing";
|
||||
public const string ProductPurchaseBusinessURL = ProductPurchaseURL + "?tab=business";
|
||||
public const string DocumentationURL = WebsiteURL + "/documentation";
|
||||
@@ -14,7 +18,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
public const string ManageAccountURL = "https://users.licensespring.com/login";
|
||||
public const string ForgotPasswordURL = "https://users.licensespring.com/reset-password";
|
||||
public const string ReportIssueURL = "https://gitlab.com/singularitygroup/hot-reload-for-unity/-/issues/new";
|
||||
public const string TroubleshootingURL = "https://hotreload.net/documentation/troubleshooting";
|
||||
public const string TroubleshootingURL = DocumentationURL + "/troubleshooting";
|
||||
public const string RecompileTroubleshootingURL = TroubleshootingURL + "#unity-recompiles-every-time-i-enterexit-playmode";
|
||||
public const string FeaturesDocumentationURL = DocumentationURL + "/features";
|
||||
public const string MultipleEditorsURL = DocumentationURL + "/multiple-editors";
|
||||
@@ -39,6 +43,6 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
public const int ConsumptionsHideWidth = 300;
|
||||
public const int ConsumptionsHideHeight = 360;
|
||||
|
||||
public const string Only40EntriesShown = "Only last 40 entries are shown";
|
||||
public static string Only40EntriesShown => Translations.Timeline.MessageOnly40EntriesShown;
|
||||
}
|
||||
}
|
||||
@@ -10,15 +10,15 @@ using SingularityGroup.HotReload.DTO;
|
||||
using SingularityGroup.HotReload.Editor.Cli;
|
||||
using SingularityGroup.HotReload.Editor.Demo;
|
||||
using SingularityGroup.HotReload.EditorDependencies;
|
||||
using SingularityGroup.HotReload.RuntimeDependencies;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
using Task = System.Threading.Tasks.Task;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using SingularityGroup.HotReload.ZXing;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Compilation;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEditorInternal;
|
||||
@@ -99,6 +99,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
//Avoid infinite recursion in case the static constructor gets accessed via `InitPatchesBlocked` below
|
||||
return;
|
||||
}
|
||||
Translations.LoadDefaultLocalization();
|
||||
SingularityGroup.HotReload.Localization.Translations.LoadDefaultLocalization();
|
||||
if (File.Exists(PackageConst.ConfigFileName)) {
|
||||
config = JsonConvert.DeserializeObject<Config>(File.ReadAllText(PackageConst.ConfigFileName));
|
||||
} else {
|
||||
@@ -121,7 +123,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
|
||||
// ReSharper disable ExpressionIsAlwaysNull
|
||||
UnityFieldHelper.Init(Log.Warning, HotReloadRunTab.Recompile, DrawOdinInspectorInfo, OdinPropertyDrawInfo, OdinPropertyDrawPrefixInfo, GetDrawVInspectorInfo(), typeof(UnityFieldDrawerPatchHelper));
|
||||
UnityFieldHelper.Init(Log.Warning, HotReloadRunTab.Recompile, DrawOdinInspectorInfo, OdinPropertyDrawInfo, OdinPropertyDrawPrefixInfo, GetDrawVInspectorInfo(), typeof(UnityFieldDrawerPatchHelper), typeof(VisualElement));
|
||||
|
||||
timer = new Timer(OnIntervalThreaded, (Action) OnIntervalMainThread, 500, 500);
|
||||
|
||||
@@ -143,6 +145,33 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
AssemblyReloadEvents.beforeAssemblyReload += () => {
|
||||
HotReloadTimelineHelper.PersistTimeline();
|
||||
};
|
||||
|
||||
CompilationPipeline.assemblyCompilationFinished += (string _, CompilerMessage[] messages) => {
|
||||
foreach (var message in messages) {
|
||||
if (message.type != CompilerMessageType.Error) {
|
||||
continue;
|
||||
}
|
||||
if (!message.message.Contains("Sirenix")) {
|
||||
continue;
|
||||
}
|
||||
if (message.message.Contains("CS0012")
|
||||
|| message.message.Contains("CS0234")
|
||||
|| message.message.Contains("CS0246")
|
||||
|| message.message.Contains("CS9286")
|
||||
) {
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
var target = NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||
var symbols = PlayerSettings.GetScriptingDefineSymbols(target).Split(";").ToList();
|
||||
symbols.Remove("ODIN_INSPECTOR");
|
||||
PlayerSettings.SetScriptingDefineSymbols(target, string.Join(";", symbols));
|
||||
#else
|
||||
var symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup).Split(';').ToList();
|
||||
symbols.Remove("ODIN_INSPECTOR");
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, string.Join(";", symbols));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CompilationPipeline.compilationFinished += obj => {
|
||||
// reset in case package got removed
|
||||
@@ -240,18 +269,22 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
&& (!HotReloadPrefs.AutoRecompilePartiallyUnsupportedChanges || HotReloadTimelineHelper.PartiallySupportedChangesCount == 0)
|
||||
|| _compileError
|
||||
|| isPlaying && !HotReloadPrefs.AutoRecompileUnsupportedChangesInPlayMode
|
||||
|| !isPlaying && !HotReloadPrefs.AutoRecompileUnsupportedChangesInEditMode
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
RecompileUnsupportedChanges();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void RecompileUnsupportedChanges() {
|
||||
if (HotReloadPrefs.ShowCompilingUnsupportedNotifications) {
|
||||
EditorWindowHelper.ShowNotification(EditorWindowHelper.NotificationStatus.NeedsRecompile);
|
||||
}
|
||||
if (isPlaying) {
|
||||
if (EditorApplication.isPlaying) {
|
||||
HotReloadState.RecompiledUnsupportedChangesInPlaymode = true;
|
||||
}
|
||||
HotReloadRunTab.Recompile();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static DateTime lastPrepareBuildInfo = DateTime.UtcNow;
|
||||
@@ -341,10 +374,9 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
if (!ServerHealthCheck.I.IsServerHealthy) {
|
||||
return;
|
||||
}
|
||||
var restartServer = EditorUtility.DisplayDialog("Hot Reload",
|
||||
$"When updating Hot Reload, the server must be restarted for the update to take effect." +
|
||||
"\nDo you want to restart it now?",
|
||||
"Restart server", "Don't restart");
|
||||
var restartServer = EditorUtility.DisplayDialog(Translations.Dialogs.DialogTitleRestartServer,
|
||||
Translations.Dialogs.DialogMessageRestartUpdate,
|
||||
Translations.Dialogs.DialogButtonRestartServer, Translations.Dialogs.DialogButtonDontRestart);
|
||||
if (restartServer) {
|
||||
RestartCodePatcher().Forget();
|
||||
}
|
||||
@@ -389,6 +421,9 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
if (response == null || disableServerLogs) {
|
||||
return;
|
||||
}
|
||||
if (!Application.isPlaying && HotReloadPrefs.PauseHotReloadInEditMode) {
|
||||
return;
|
||||
}
|
||||
foreach (var responseWarning in response.warnings) {
|
||||
if (responseWarning.Contains("Scripts have compile errors")) {
|
||||
if (compileError) {
|
||||
@@ -431,6 +466,20 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// Reset startup progress
|
||||
startupProgress = null;
|
||||
}
|
||||
|
||||
if (!ServerHealthCheck.I.IsServerHealthy) {
|
||||
stopping = false;
|
||||
}
|
||||
if (startupProgress?.Item1 == 1) {
|
||||
starting = false;
|
||||
}
|
||||
if (!_requestingFlushErrors && Running) {
|
||||
RequestFlushErrors().Forget();
|
||||
}
|
||||
|
||||
if (!Application.isPlaying && HotReloadPrefs.PauseHotReloadInEditMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (HotReloadPrefs.AutoDisableHotReloadWithDebugger && Debugger.IsAttached) {
|
||||
if (!HotReloadState.ShowedDebuggerCompatibility) {
|
||||
@@ -440,7 +489,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
if (CodePatcher.I.OriginalPatchMethods.Count() > 0) {
|
||||
if (!Application.isPlaying) {
|
||||
if (!loggedDebuggerRecompile) {
|
||||
Log.Info("Debugger was attached. Hot Reload may interfere with your debugger session. Recompiling in order to get full debugger experience.");
|
||||
Log.Info(Translations.Errors.InfoDebuggerAttached);
|
||||
loggedDebuggerRecompile = true;
|
||||
}
|
||||
HotReloadRunTab.Recompile();
|
||||
@@ -483,15 +532,6 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!ServerHealthCheck.I.IsServerHealthy) {
|
||||
stopping = false;
|
||||
}
|
||||
if (startupProgress?.Item1 == 1) {
|
||||
starting = false;
|
||||
}
|
||||
if (!_requestingFlushErrors && Running) {
|
||||
RequestFlushErrors().Forget();
|
||||
}
|
||||
CheckEditorSettings();
|
||||
}
|
||||
|
||||
@@ -519,7 +559,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
if (newInlinedMethods?.Count > 0) {
|
||||
if (!HotReloadPrefs.LoggedInlinedMethodsDialogue) {
|
||||
Log.Warning("Unity Editor inlines simple methods when it's in \"Release\" mode, which Hot Reload cannot patch.\n\nSwitch to Debug mode to avoid this problem, or let Hot Reload fully recompile Unity when this issue occurs.");
|
||||
Log.Warning(Translations.Errors.WarningInlinedMethods);
|
||||
HotReloadPrefs.LoggedInlinedMethodsDialogue = true;
|
||||
}
|
||||
HotReloadTimelineHelper.CreateInlinedMethodsEntry(entryType: EntryType.Foldout, patchedMethodsDisplayNames: newInlinedMethods.Select(mb => $"{mb.DeclaringType?.Name}::{mb.Name}").ToArray());
|
||||
@@ -533,7 +573,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
RequestHelper.RequestEditorEventWithRetry(new Stat(StatSource.Client, StatLevel.Debug, StatFeature.Patching, StatEventType.Inlined)).Forget();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.Warning($"Inline method checker ran into an exception. Please contact support with the exception message to investigate the problem. Exception: {e.Message}");
|
||||
Log.Warning(Translations.Errors.WarningInlineMethodChecker, e.Message);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -606,12 +646,15 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
return;
|
||||
}
|
||||
// ignore temp compile files
|
||||
if (assetPath.Contains("UnityDirMonSyncFile") || assetPath.EndsWith("~", StringComparison.Ordinal)) {
|
||||
if (assetPath.Contains("UnityDirMonSyncFile")
|
||||
|| assetPath.EndsWith("~", StringComparison.Ordinal)
|
||||
|| assetPath.Contains("StreamingAssets")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
foreach (var compileFile in compileFiles) {
|
||||
if (assetPath.EndsWith(compileFile, StringComparison.Ordinal)) {
|
||||
HotReloadTimelineHelper.CreateErrorEventEntry($"errors: AssemblyFileEdit: Editing assembly files requires recompiling in Unity. in {assetPath}", entryType: EntryType.Foldout);
|
||||
HotReloadTimelineHelper.CreateErrorEventEntry(string.Format(Translations.Utility.AssemblyFileEditError, assetPath), entryType: EntryType.Foldout);
|
||||
_applyingFailed = true;
|
||||
if (HotReloadPrefs.AutoRecompileUnsupportedChangesImmediately || UnityEditorInternal.InternalEditorUtility.isApplicationActive) {
|
||||
TryRecompileUnsupportedChanges();
|
||||
@@ -622,7 +665,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// Add plugin changes to unsupported changes list
|
||||
foreach (var plugin in plugins) {
|
||||
if (assetPath.EndsWith(plugin, StringComparison.Ordinal)) {
|
||||
HotReloadTimelineHelper.CreateErrorEventEntry($"errors: NativePluginEdit: Editing native plugins requires recompiling in Unity. in {assetPath}", entryType: EntryType.Foldout);
|
||||
HotReloadTimelineHelper.CreateErrorEventEntry(string.Format(Translations.Utility.NativePluginEditError, assetPath), entryType: EntryType.Foldout);
|
||||
_applyingFailed = true;
|
||||
if (HotReloadPrefs.AutoRecompileUnsupportedChangesImmediately || UnityEditorInternal.InternalEditorUtility.isApplicationActive) {
|
||||
TryRecompileUnsupportedChanges();
|
||||
@@ -660,7 +703,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate);
|
||||
}
|
||||
} catch (Exception e){
|
||||
Log.Warning($"Refreshing asset at path: {assetPath} failed due to exception: {e}");
|
||||
Log.Warning(Translations.Errors.WarningRefreshingAssetFailed, assetPath, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,7 +823,9 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
}
|
||||
if (lastCompileErrorLog != null) {
|
||||
Log.Error(lastCompileErrorLog);
|
||||
if (!disableServerLogs) {
|
||||
Log.Error(lastCompileErrorLog);
|
||||
}
|
||||
lastCompileErrorLog = null;
|
||||
}
|
||||
RequestHelper.RequestEditorEventWithRetry(new Stat(StatSource.Client, StatLevel.Debug, StatFeature.Reload, StatEventType.CompileError), new EditorExtraData {
|
||||
@@ -838,6 +883,15 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
{ StatKey.PatchId, response.id },
|
||||
}).Forget();
|
||||
}
|
||||
|
||||
if (!autoRecompiled && patchResult?.inspectorFieldAdded == true && HotReloadPrefs.AutoRecompileInspectorFieldsEdit && !Application.isPlaying) {
|
||||
HotReloadSuggestionsHelper.SetSuggestionsShown(HotReloadSuggestionKind.UnsupportedChanges);
|
||||
RecompileUnsupportedChanges();
|
||||
autoRecompiled = true;
|
||||
HotReloadTimelineHelper.CreateErrorEventEntry(Translations.Utility.InspectorFieldChangeError, entryType: EntryType.Child);
|
||||
HotReloadTimelineHelper.CreateReloadFinishedWithWarningsEventEntry();
|
||||
Log.Info(Translations.Errors.InfoInspectorFieldRecompile);
|
||||
}
|
||||
|
||||
// When patching different assembly, compile error will get removed, even though it's still there
|
||||
// It's a shortcut we take for simplicity
|
||||
@@ -846,7 +900,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
|
||||
foreach (string responseFailure in response.failures) {
|
||||
if (responseFailure.Contains("error CS")) {
|
||||
if (responseFailure.Contains("error CS") && !disableServerLogs) {
|
||||
Log.Error(responseFailure);
|
||||
} else if (autoRecompiled) {
|
||||
Log.Info(responseFailure);
|
||||
@@ -924,9 +978,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
foreach (var patch in response.patches) {
|
||||
if(patch.unityJobs.Length > 0) {
|
||||
Debug.LogWarning("A unity job was hot reloaded. " +
|
||||
"This will cause a harmless warning that can be ignored. " +
|
||||
$"More info about this can be found here: {Constants.TroubleshootingURL}");
|
||||
Debug.LogWarning(string.Format(Translations.Errors.WarningUnityJobHotReloaded, Constants.TroubleshootingURL));
|
||||
HotReloadPrefs.LoggedBurstHint = true;
|
||||
break;
|
||||
}
|
||||
@@ -1013,7 +1065,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
RecordActiveDaysForRateApp();
|
||||
try {
|
||||
requestingStart = true;
|
||||
startupProgress = Tuple.Create(0f, "Starting Hot Reload");
|
||||
startupProgress = Tuple.Create(0f, Translations.UI.StartingHotReloadMessage);
|
||||
serverStartedAt = DateTime.UtcNow;
|
||||
await HotReloadCli.StartAsync(exposeToNetwork, allAssetChanges, disableConsoleWindow, isReleaseMode, detailedErrorReporting, loginData).ConfigureAwait(false);
|
||||
}
|
||||
@@ -1123,10 +1175,11 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
bool consumptionsChanged = Status?.freeSessionRunning != resp.freeSessionRunning || Status?.freeSessionEndTime != resp.freeSessionEndTime;
|
||||
bool expiresAtChanged = Status?.licenseExpiresAt != resp.licenseExpiresAt;
|
||||
if (!EditorCodePatcher.LoginNotRequired
|
||||
&& !resp.isLicensed
|
||||
&& resp.consumptionsUnavailableReason == ConsumptionsUnavailableReason.UnrecoverableError
|
||||
&& Status?.consumptionsUnavailableReason != ConsumptionsUnavailableReason.UnrecoverableError
|
||||
) {
|
||||
Log.Error("Free charges unavailabe. Please contact support if the issue persists.");
|
||||
Log.Error(Translations.Errors.ErrorFreeChargesUnavailable);
|
||||
}
|
||||
if (!RequestingLoginInfo && resp.requestError == null) {
|
||||
Status = resp;
|
||||
@@ -1139,7 +1192,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
var oldStartupProgress = startupProgress;
|
||||
var newStartupProgress = Tuple.Create(
|
||||
resp.startupProgress,
|
||||
string.IsNullOrEmpty(resp.startupStatus) ? "Starting Hot Reload" : resp.startupStatus);
|
||||
string.IsNullOrEmpty(resp.startupStatus) ? Translations.UI.StartingHotReloadMessage : resp.startupStatus);
|
||||
|
||||
startupProgress = newStartupProgress;
|
||||
// ReSharper disable once CompareOfFloatsByEqualityOperator
|
||||
|
||||
@@ -2,6 +2,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SingularityGroup.HotReload.DTO;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
internal static class EditorIndicationState {
|
||||
@@ -21,6 +23,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
ActivationFailed,
|
||||
FinishRegistration,
|
||||
Undetected,
|
||||
Paused,
|
||||
}
|
||||
|
||||
internal static readonly string greyIconPath = "grey";
|
||||
@@ -30,6 +33,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// grey icon:
|
||||
{ IndicationStatus.FinishRegistration, greyIconPath },
|
||||
{ IndicationStatus.Stopped, greyIconPath },
|
||||
{ IndicationStatus.Paused, greyIconPath },
|
||||
// green icon:
|
||||
{ IndicationStatus.Started, greenIconPath },
|
||||
// log icons:
|
||||
@@ -55,22 +59,23 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
.ToArray();
|
||||
|
||||
// NOTE: if you add longer text, make sure UI is wide enough for it
|
||||
public static readonly Dictionary<IndicationStatus, string> IndicationText = new Dictionary<IndicationStatus, string> {
|
||||
{ IndicationStatus.FinishRegistration, "Finish Registration" },
|
||||
{ IndicationStatus.Started, "Waiting for code changes" },
|
||||
{ IndicationStatus.Stopping, "Stopping Hot Reload" },
|
||||
{ IndicationStatus.Stopped, "Hot Reload inactive" },
|
||||
{ IndicationStatus.Installing, "Installing" },
|
||||
{ IndicationStatus.Starting, "Starting Hot Reload" },
|
||||
{ IndicationStatus.Reloaded, "Reload finished" },
|
||||
{ IndicationStatus.PartiallySupported, "Changes partially applied" },
|
||||
{ IndicationStatus.Unsupported, "Finished with warnings" },
|
||||
{ IndicationStatus.Patching, "Reloading" },
|
||||
{ IndicationStatus.Compiling, "Compiling" },
|
||||
{ IndicationStatus.CompileErrors, "Scripts have compile errors" },
|
||||
{ IndicationStatus.ActivationFailed, "Activation failed" },
|
||||
{ IndicationStatus.Loading, "Loading" },
|
||||
{ IndicationStatus.Undetected, "No changes applied"},
|
||||
public static Dictionary<IndicationStatus, string> IndicationText => new Dictionary<IndicationStatus, string> {
|
||||
{ IndicationStatus.FinishRegistration, Translations.Miscellaneous.IndicationFinishRegistration },
|
||||
{ IndicationStatus.Started, Translations.Miscellaneous.IndicationStarted },
|
||||
{ IndicationStatus.Stopping, Translations.Miscellaneous.IndicationStopping },
|
||||
{ IndicationStatus.Stopped, Translations.Miscellaneous.IndicationStopped },
|
||||
{ IndicationStatus.Paused, Translations.Miscellaneous.IndicationPaused },
|
||||
{ IndicationStatus.Installing, Translations.Miscellaneous.IndicationInstalling },
|
||||
{ IndicationStatus.Starting, Translations.Miscellaneous.IndicationStarting },
|
||||
{ IndicationStatus.Reloaded, Translations.Miscellaneous.IndicationReloaded },
|
||||
{ IndicationStatus.PartiallySupported, Translations.Miscellaneous.IndicationPartiallySupported },
|
||||
{ IndicationStatus.Unsupported, Translations.Miscellaneous.IndicationUnsupported },
|
||||
{ IndicationStatus.Patching, Translations.Miscellaneous.IndicationPatching },
|
||||
{ IndicationStatus.Compiling, Translations.Miscellaneous.IndicationCompiling },
|
||||
{ IndicationStatus.CompileErrors, Translations.Miscellaneous.IndicationCompileErrors },
|
||||
{ IndicationStatus.ActivationFailed, Translations.Miscellaneous.IndicationActivationFailed },
|
||||
{ IndicationStatus.Loading, Translations.Miscellaneous.IndicationLoading },
|
||||
{ IndicationStatus.Undetected, Translations.Miscellaneous.IndicationUndetected},
|
||||
};
|
||||
|
||||
private const int MinSpinnerDuration = 200;
|
||||
@@ -127,6 +132,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
return IndicationStatus.Compiling;
|
||||
if (EditorCodePatcher.Starting && !EditorCodePatcher.Stopping)
|
||||
return IndicationStatus.Starting;
|
||||
if (!Application.isPlaying && HotReloadPrefs.PauseHotReloadInEditMode)
|
||||
return IndicationStatus.Paused;
|
||||
if (!EditorCodePatcher.Running)
|
||||
return IndicationStatus.Stopped;
|
||||
if (EditorCodePatcher.Status?.isLicensed != true && EditorCodePatcher.Status?.isFree != true && EditorCodePatcher.Status?.freeSessionFinished == true)
|
||||
@@ -172,7 +179,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
if (indicationStatus == IndicationStatus.Starting && EditorCodePatcher.StartupProgress != null) {
|
||||
txt = EditorCodePatcher.StartupProgress.Item2;
|
||||
} else if (!IndicationText.TryGetValue(indicationStatus, out txt)) {
|
||||
Log.Warning($"Indication text not found for status {indicationStatus}");
|
||||
Log.Warning(Translations.Errors.WarningIndicationTextNotFound, indicationStatus);
|
||||
} else {
|
||||
txt = IndicationText[indicationStatus];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using UnityEditor;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using UnityEditor.Compilation;
|
||||
|
||||
@@ -14,12 +15,12 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
internal static class AssemblyOmission {
|
||||
// [MenuItem("Window/Hot Reload Dev/List omitted projects")]
|
||||
private static void Check() {
|
||||
Log.Info("To compile C# files same as a Player build, we must omit projects which aren't part of the selected Player build.");
|
||||
Log.Info(Translations.Errors.InfoOmitProjectsForPlayerBuild);
|
||||
var omitted = GetOmittedProjects(EditorUserBuildSettings.activeScriptCompilationDefines);
|
||||
Log.Info("---------");
|
||||
Log.Info(Translations.Errors.InfoSeparator);
|
||||
|
||||
foreach (var name in omitted) {
|
||||
Log.Info("omitted editor/other project named: {0}", name);
|
||||
Log.Info(Translations.Errors.InfoOmittedEditorProject, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +70,10 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
|
||||
if (verboseLogs) {
|
||||
foreach (var name in editorAssemblies) {
|
||||
Log.Info("found project named {0}", name);
|
||||
Log.Info(Translations.Errors.InfoFoundProjectNamed, name);
|
||||
}
|
||||
foreach (var playerAssemblyName in playerAssemblies) {
|
||||
Log.Debug("player assembly named {0}", playerAssemblyName);
|
||||
Log.Debug(string.Format(Translations.Utility.PlayerAssemblyDebug, playerAssemblyName));
|
||||
}
|
||||
}
|
||||
// leaves the editor assemblies that are not built into player assemblies (e.g. editor and test assemblies)
|
||||
|
||||
@@ -12,12 +12,14 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
public readonly BuildTarget activeBuildTarget;
|
||||
public readonly string[] omittedProjects;
|
||||
public readonly bool batchMode;
|
||||
public readonly string locale;
|
||||
|
||||
public BuildInfoInput(string allDefineSymbols, BuildTarget activeBuildTarget, string[] omittedProjects, bool batchMode) {
|
||||
public BuildInfoInput(string allDefineSymbols, BuildTarget activeBuildTarget, string[] omittedProjects, bool batchMode, string locale) {
|
||||
this.allDefineSymbols = allDefineSymbols;
|
||||
this.activeBuildTarget = activeBuildTarget;
|
||||
this.omittedProjects = omittedProjects;
|
||||
this.batchMode = batchMode;
|
||||
this.locale = locale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,12 +33,14 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
});
|
||||
// cached so unexpensive most of the time
|
||||
var omittedProjects = AssemblyOmission.GetOmittedProjects(allDefineSymbols);
|
||||
var locale = PackageConst.DefaultLocale;
|
||||
|
||||
return new BuildInfoInput(
|
||||
allDefineSymbols: allDefineSymbols,
|
||||
activeBuildTarget: buildTarget,
|
||||
omittedProjects: omittedProjects,
|
||||
batchMode: batchMode
|
||||
batchMode: batchMode,
|
||||
locale: locale
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,7 +54,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
allDefineSymbols: allDefineSymbols,
|
||||
activeBuildTarget: buildTarget,
|
||||
omittedProjects: AssemblyOmission.GetOmittedProjects(allDefineSymbols),
|
||||
batchMode: Application.isBatchMode
|
||||
batchMode: Application.isBatchMode,
|
||||
locale: PackageConst.DefaultLocale
|
||||
));
|
||||
}
|
||||
|
||||
@@ -72,6 +77,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
buildMachinePort = RequestHelper.port,
|
||||
activeBuildTarget = input.activeBuildTarget.ToString(),
|
||||
buildMachineRequestOrigin = RequestHelper.origin,
|
||||
locale = input.locale
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||
using UnityEditor;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
internal static class EditorWindowHelper {
|
||||
@@ -37,9 +38,9 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
NeedsRecompile
|
||||
}
|
||||
|
||||
private static readonly Dictionary<NotificationStatus, GUIContent> notificationContent = new Dictionary<NotificationStatus, GUIContent> {
|
||||
{ NotificationStatus.Patching, new GUIContent("[Hot Reload] Applying patches...")},
|
||||
{ NotificationStatus.NeedsRecompile, new GUIContent("[Hot Reload] Unsupported Changes detected! Recompiling...")},
|
||||
private static Dictionary<NotificationStatus, GUIContent> notificationContent => new Dictionary<NotificationStatus, GUIContent> {
|
||||
{ NotificationStatus.Patching, new GUIContent(Translations.Miscellaneous.NotificationPatching)},
|
||||
{ NotificationStatus.NeedsRecompile, new GUIContent(Translations.Miscellaneous.NotificationNeedsRecompile)},
|
||||
};
|
||||
|
||||
static Type gameViewT;
|
||||
|
||||
@@ -4,11 +4,14 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.DTO;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Compilation;
|
||||
using UnityEditor.PackageManager;
|
||||
using UnityEditor.PackageManager.Requests;
|
||||
using UnityEngine;
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
|
||||
@@ -111,19 +114,19 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static readonly OpenURLButton recompileTroubleshootingButton = new OpenURLButton("Docs", Constants.RecompileTroubleshootingURL);
|
||||
internal static readonly OpenURLButton featuresDocumentationButton = new OpenURLButton("Docs", Constants.FeaturesDocumentationURL);
|
||||
internal static readonly OpenURLButton multipleEditorsDocumentationButton = new OpenURLButton("Docs", Constants.MultipleEditorsURL);
|
||||
internal static readonly OpenURLButton debuggerDocumentationButton = new OpenURLButton("More Info", Constants.DebuggerURL);
|
||||
internal static readonly OpenURLButton recompileTroubleshootingButton = new OpenURLButton(Translations.Suggestions.ButtonDocs, Constants.RecompileTroubleshootingURL);
|
||||
internal static readonly OpenURLButton featuresDocumentationButton = new OpenURLButton(Translations.Suggestions.ButtonDocs, Constants.FeaturesDocumentationURL);
|
||||
internal static readonly OpenURLButton multipleEditorsDocumentationButton = new OpenURLButton(Translations.Suggestions.ButtonDocs, Constants.MultipleEditorsURL);
|
||||
internal static readonly OpenURLButton debuggerDocumentationButton = new OpenURLButton(Translations.Suggestions.ButtonMoreInfo, Constants.DebuggerURL);
|
||||
public static Dictionary<HotReloadSuggestionKind, AlertEntry> suggestionMap = new Dictionary<HotReloadSuggestionKind, AlertEntry> {
|
||||
{ HotReloadSuggestionKind.UnityBestDevelopmentToolAward2023, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Vote for the \"Best Development Tool\" Award!",
|
||||
"Hot Reload was nominated for the \"Best Development Tool\" Award. Please consider voting. Thank you!",
|
||||
Translations.Suggestions.Award2023Title,
|
||||
Translations.Suggestions.Award2023Message,
|
||||
actionData: () => {
|
||||
GUILayout.Space(6f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Vote ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonVote)) {
|
||||
Application.OpenURL(Constants.VoteForAwardURL);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.UnityBestDevelopmentToolAward2023);
|
||||
}
|
||||
@@ -135,8 +138,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.UnsupportedChanges, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Which changes does Hot Reload support?",
|
||||
"Hot Reload supports most code changes, but there are some limitations. Generally, changes to methods and fields are supported. Things like adding new types is not (yet) supported. See the documentation for the list of current features and our current roadmap",
|
||||
Translations.Suggestions.UnsupportedChangesTitle,
|
||||
Translations.Suggestions.UnsupportedChangesMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
@@ -149,8 +152,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.UnsupportedPackages, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Unsupported package detected",
|
||||
"The following packages are only partially supported: ECS, Mirror, Fishnet, and Photon. Hot Reload will work in the project, but changes specific to those packages might not hot-reload",
|
||||
Translations.Suggestions.UnsupportedPackagesTitle,
|
||||
Translations.Suggestions.UnsupportedPackagesMessage,
|
||||
iconType: AlertType.UnsupportedChange,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
@@ -164,8 +167,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.AutoRecompiledWhenPlaymodeStateChanges, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Unity recompiles on enter/exit play mode?",
|
||||
"If you have an issue with the Unity Editor recompiling when the Play Mode state changes, more info is available in the docs. Feel free to reach out if you require assistance. We'll be glad to help.",
|
||||
Translations.Suggestions.AutoRecompiledPlaymodeTitle,
|
||||
Translations.Suggestions.AutoRecompiledPlaymodeMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
@@ -183,23 +186,23 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
{ HotReloadSuggestionKind.AutoRecompiledWhenPlaymodeStateChanges2022, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Unsupported setting detected",
|
||||
"The 'Sprite Packer Mode' setting can cause unintended recompilations if set to 'Sprite Atlas V1 - Always Enabled'",
|
||||
Translations.Suggestions.AutoRecompiled2022Title,
|
||||
Translations.Suggestions.AutoRecompiled2022Message,
|
||||
iconType: AlertType.UnsupportedChange,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Use \"Build Time Only Atlas\" ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonUseBuildTimeOnlyAtlas)) {
|
||||
if (EditorSettings.spritePackerMode == SpritePackerMode.SpriteAtlasV2) {
|
||||
EditorSettings.spritePackerMode = SpritePackerMode.SpriteAtlasV2Build;
|
||||
} else {
|
||||
EditorSettings.spritePackerMode = SpritePackerMode.BuildTimeOnlyAtlas;
|
||||
}
|
||||
}
|
||||
if (GUILayout.Button(" Open Settings ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOpenSettings)) {
|
||||
SettingsService.OpenProjectSettings("Project/Editor");
|
||||
}
|
||||
if (GUILayout.Button(" Ignore suggestion ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonIgnoreSuggestion)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.AutoRecompiledWhenPlaymodeStateChanges2022);
|
||||
}
|
||||
|
||||
@@ -213,14 +216,20 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
#endif
|
||||
{ HotReloadSuggestionKind.MultidimensionalArrays, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Use jagged instead of multidimensional arrays",
|
||||
"Hot Reload doesn't support methods with multidimensional arrays ([,]). You can work around this by using jagged arrays ([][])",
|
||||
Translations.Suggestions.MultidimensionalArraysTitle,
|
||||
Translations.Suggestions.MultidimensionalArraysMessage,
|
||||
iconType: AlertType.UnsupportedChange,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Learn more ")) {
|
||||
Application.OpenURL("https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1814");
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonLearnMore)) {
|
||||
string url;
|
||||
if (PackageConst.DefaultLocaleField == Locale.SimplifiedChinese) {
|
||||
url = "https://learn.microsoft.com/zh-cn/dotnet/fundamentals/code-analysis/quality-rules/ca1814";
|
||||
} else {
|
||||
url = "https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1814";
|
||||
}
|
||||
Application.OpenURL(url);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
@@ -230,12 +239,12 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.EditorsWithoutHRRunning, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Some Unity instances don't have Hot Reload running.",
|
||||
"Make sure that either: \n1) Hot Reload is installed and running on all Editor instances, or \n2) Hot Reload is stopped in all Editor instances where it is installed.",
|
||||
Translations.Suggestions.EditorsWithoutHRTitle,
|
||||
Translations.Suggestions.EditorsWithoutHRMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Stop Hot Reload ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonStopHotReload)) {
|
||||
EditorCodePatcher.StopCodePatcher().Forget();
|
||||
}
|
||||
GUILayout.Space(5f);
|
||||
@@ -243,7 +252,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
multipleEditorsDocumentationButton.OnGUI();
|
||||
GUILayout.Space(5f);
|
||||
|
||||
if (GUILayout.Button(" Don't show again ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDontShowAgain)) {
|
||||
HotReloadSuggestionsHelper.SetSuggestionsShown(HotReloadSuggestionKind.EditorsWithoutHRRunning);
|
||||
HotReloadSuggestionsHelper.SetSuggestionInactive(HotReloadSuggestionKind.EditorsWithoutHRRunning);
|
||||
}
|
||||
@@ -258,16 +267,16 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// Not in use (never reported from the server)
|
||||
{ HotReloadSuggestionKind.FieldInitializerWithSideEffects, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Field initializer with side-effects detected",
|
||||
"A field initializer update might have side effects, e.g. calling a method or creating an object.\n\nWhile Hot Reload does support this, it can sometimes be confusing when the initializer logic runs at 'unexpected times'.",
|
||||
Translations.Suggestions.FieldInitializerSideEffectsTitle,
|
||||
Translations.Suggestions.FieldInitializerSideEffectsMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" OK ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOK)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.FieldInitializerWithSideEffects);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(" Don't show again ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDontShowAgain)) {
|
||||
SetSuggestionsShown(HotReloadSuggestionKind.FieldInitializerWithSideEffects);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.FieldInitializerWithSideEffects);
|
||||
}
|
||||
@@ -279,17 +288,17 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.DetailedErrorReportingIsEnabled, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Detailed error reporting is enabled",
|
||||
"When an error happens in Hot Reload, the exception stacktrace is sent as telemetry to help diagnose and fix the issue.\nThe exception stack trace is only included if it originated from the Hot Reload package or binary. Stacktraces from your own code are not sent.\nYou can disable detailed error reporting to prevent telemetry from including any information about your project.",
|
||||
Translations.Suggestions.DetailedErrorReportingTitle,
|
||||
Translations.Suggestions.DetailedErrorReportingMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
GUILayout.Space(4f);
|
||||
if (GUILayout.Button(" OK ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOKPadded)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.DetailedErrorReportingIsEnabled);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(" Disable ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDisable)) {
|
||||
HotReloadSettingsTab.DisableDetailedErrorReportingInner(true);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.DetailedErrorReportingIsEnabled);
|
||||
}
|
||||
@@ -303,22 +312,22 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// Not in use (never reported from the server)
|
||||
{ HotReloadSuggestionKind.FieldInitializerExistingInstancesEdited, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Field initializer edit updated the value of existing class instances",
|
||||
"By default, Hot Reload updates field values of existing object instances when new field initializer has constant value.\n\nIf you want to change this behavior, disable the \"Apply field initializer edits to existing class instances\" option in Settings or click the button below.",
|
||||
Translations.Suggestions.FieldInitializerEditedTitle,
|
||||
Translations.Suggestions.FieldInitializerEditedMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Turn off ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonTurnOff)) {
|
||||
#pragma warning disable CS0618
|
||||
HotReloadSettingsTab.ApplyApplyFieldInitializerEditsToExistingClassInstances(false);
|
||||
#pragma warning restore CS0618
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.FieldInitializerExistingInstancesEdited);
|
||||
}
|
||||
if (GUILayout.Button(" Open Settings ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOpenSettings)) {
|
||||
HotReloadWindow.Current.SelectTab(typeof(HotReloadSettingsTab));
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(" Don't show again ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDontShowAgain)) {
|
||||
SetSuggestionsShown(HotReloadSuggestionKind.FieldInitializerExistingInstancesEdited);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.FieldInitializerExistingInstancesEdited);
|
||||
}
|
||||
@@ -330,12 +339,12 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.FieldInitializerExistingInstancesUnedited, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Field initializer edits don't apply to existing objects",
|
||||
"By default, Hot Reload applies field initializer edits of existing fields only to new objects (newly instantiated classes), just like normal C#.\n\nFor rapid prototyping, you can use static fields which will update across all instances.",
|
||||
Translations.Suggestions.FieldInitializerUneditedTitle,
|
||||
Translations.Suggestions.FieldInitializerUneditedMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(8f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" OK ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOK)) {
|
||||
SetSuggestionsShown(HotReloadSuggestionKind.FieldInitializerExistingInstancesUnedited);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.FieldInitializerExistingInstancesUnedited);
|
||||
}
|
||||
@@ -348,22 +357,22 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.AddMonobehaviourMethod, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"New MonoBehaviour methods are not shown in the inspector",
|
||||
"New methods in MonoBehaviours are not shown in the inspector until the script is recompiled. This is a limitation of Hot Reload handling of Unity's serialization system.\n\nYou can use the button below to auto recompile partially supported changes such as this one.",
|
||||
Translations.Suggestions.AddMonobehaviourMethodTitle,
|
||||
Translations.Suggestions.AddMonobehaviourMethodMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(8f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" OK ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonOK)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.AddMonobehaviourMethod);
|
||||
}
|
||||
if (GUILayout.Button(" Auto Recompile ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonAutoRecompile)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.AddMonobehaviourMethod);
|
||||
HotReloadPrefs.AutoRecompilePartiallyUnsupportedChanges = true;
|
||||
HotReloadPrefs.DisplayNewMonobehaviourMethodsAsPartiallySupported = true;
|
||||
HotReloadRunTab.RecompileWithChecks();
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(" Don't show again ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDontShowAgain)) {
|
||||
SetSuggestionsShown(HotReloadSuggestionKind.AddMonobehaviourMethod);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.AddMonobehaviourMethod);
|
||||
}
|
||||
@@ -376,12 +385,12 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
{ HotReloadSuggestionKind.SwitchToDebugModeForInlinedMethods, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Switch code optimization to Debug Mode",
|
||||
"In Release Mode some methods are inlined, which prevents Hot Reload from applying changes. A clear warning is always shown when this happens, but you can use Debug Mode to avoid the issue altogether",
|
||||
Translations.Suggestions.SwitchToDebugModeTitle,
|
||||
Translations.Suggestions.SwitchToDebugModeMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Switch to Debug mode ") && HotReloadRunTab.ConfirmExitPlaymode("Switching code optimization will stop Play Mode.\n\nDo you wish to proceed?")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonSwitchToDebugMode) && HotReloadRunTab.ConfirmExitPlaymode(Translations.Suggestions.SwitchToDebugModeConfirmation)) {
|
||||
HotReloadRunTab.SwitchToDebugMode();
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
@@ -394,18 +403,18 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
#endif
|
||||
{ HotReloadSuggestionKind.HotReloadWhileDebuggerIsAttached, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Hot Reload is disabled while a debugger is attached",
|
||||
"Hot Reload automatically disables itself while a debugger is attached, as it can otherwise interfere with certain debugger features.\nWhile disabled, every code change will trigger a full Unity recompilation.\n\nYou can choose to keep Hot Reload enabled while a debugger is attached, though some features like debugger variable inspection might not always work as expected.",
|
||||
Translations.Suggestions.DebuggerAttachedTitle,
|
||||
Translations.Suggestions.DebuggerAttachedMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(8f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Keep enabled during debugging ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonKeepEnabledDuringDebugging)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.HotReloadWhileDebuggerIsAttached);
|
||||
HotReloadPrefs.AutoDisableHotReloadWithDebugger = false;
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
debuggerDocumentationButton.OnGUI();
|
||||
if (GUILayout.Button(" Don't show again ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonDontShowAgain)) {
|
||||
SetSuggestionsShown(HotReloadSuggestionKind.HotReloadWhileDebuggerIsAttached);
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.HotReloadWhileDebuggerIsAttached);
|
||||
}
|
||||
@@ -417,14 +426,14 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
)},
|
||||
{ HotReloadSuggestionKind.HotReloadedMethodsWhenDebuggerIsAttached, new AlertEntry(
|
||||
AlertType.Suggestion,
|
||||
"Hot Reload may interfere with your debugger session",
|
||||
"Some debugger features, like variable inspection, might not work as expected for methods patched during the Hot Reload session. A full Unity recompile is required to get the full debugger experience.",
|
||||
Translations.Suggestions.DebuggerMethodsTitle,
|
||||
Translations.Suggestions.DebuggerMethodsMessage,
|
||||
actionData: () => {
|
||||
GUILayout.Space(8f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(" Recompile ")) {
|
||||
if (GUILayout.Button(Translations.Suggestions.ButtonRecompile)) {
|
||||
SetSuggestionInactive(HotReloadSuggestionKind.HotReloadedMethodsWhenDebuggerIsAttached);
|
||||
if (HotReloadRunTab.ConfirmExitPlaymode("Using the Recompile button will stop Play Mode.\n\nDo you wish to proceed?")) {
|
||||
if (HotReloadRunTab.ConfirmExitPlaymode(Translations.Suggestions.DebuggerMethodsConfirmation)) {
|
||||
HotReloadRunTab.Recompile();
|
||||
}
|
||||
}
|
||||
@@ -516,17 +525,11 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
private static async Task CheckEditorsWithoutHRAsync() {
|
||||
try {
|
||||
checkingEditorsWihtoutHR = true;
|
||||
var showSuggestion = await Task.Run(() => {
|
||||
try {
|
||||
var runningUnities = Process.GetProcessesByName("Unity Editor").Length;
|
||||
var runningPatchers = Process.GetProcessesByName("CodePatcherCLI").Length;
|
||||
return runningPatchers > 0 && runningUnities > runningPatchers;
|
||||
} catch (ArgumentException) {
|
||||
// On some devices GetProcessesByName throws ArgumentException for no good reason.
|
||||
// it happens rarely and the feature is not the most important so proper solution is not required
|
||||
return false;
|
||||
}
|
||||
});
|
||||
var editorsWithoutHr = await RequestHelper.RequestEditorsWithoutHRRunning();
|
||||
if (editorsWithoutHr == null) {
|
||||
return;
|
||||
}
|
||||
var showSuggestion = editorsWithoutHr.editorsWithoutHRRunning;
|
||||
if (!showSuggestion) {
|
||||
HotReloadSuggestionsHelper.SetSuggestionInactive(HotReloadSuggestionKind.EditorsWithoutHRRunning);
|
||||
return;
|
||||
|
||||
@@ -5,10 +5,11 @@ using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using JetBrains.Annotations;
|
||||
using SingularityGroup.HotReload.DTO;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
internal enum TimelineType {
|
||||
@@ -152,7 +153,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.Warning($"Failed initializing Hot Reload event entries on start: {e}");
|
||||
Log.Warning(Translations.Errors.WarningInitializingEventEntries, e);
|
||||
} finally {
|
||||
// Ensure red dot is not triggered for existing entries
|
||||
HotReloadState.ShowingRedDot = redDotShown;
|
||||
@@ -168,7 +169,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
try {
|
||||
File.WriteAllText(path: filePath, contents: JsonConvert.SerializeObject(persistedData));
|
||||
} catch (Exception e) {
|
||||
Log.Warning($"Failed persisting Hot Reload event entries: {e}");
|
||||
Log.Warning(Translations.Errors.WarningPersistingEventEntries, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,20 +192,20 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
};
|
||||
|
||||
#pragma warning disable CS0612 // obsolete
|
||||
public static Dictionary<PartiallySupportedChange, string> partiallySupportedChangeDescriptions = new Dictionary<PartiallySupportedChange, string> {
|
||||
{PartiallySupportedChange.LambdaClosure, "A lambda closure was edited (captured variable was added or removed). Changes to it will only be visible to the next created lambda(s)."},
|
||||
{PartiallySupportedChange.EditAsyncMethod, "An async method was edited. Changes to it will only be visible the next time this method is called."},
|
||||
{PartiallySupportedChange.AddMonobehaviourMethod, "A new method was added. It will not show up in the Inspector until the next full recompilation."},
|
||||
{PartiallySupportedChange.EditMonobehaviourField, "A field in a MonoBehaviour was removed or reordered. The inspector will not notice this change until the next full recompilation."},
|
||||
{PartiallySupportedChange.EditCoroutine, "An IEnumerator/IEnumerable was edited. When used as a coroutine, changes to it will only be visible the next time the coroutine is created."},
|
||||
{PartiallySupportedChange.EditGenericFieldInitializer, "A field initializer inside generic class was edited. Field initializer will not have any effect until the next full recompilation."},
|
||||
{PartiallySupportedChange.AddEnumMember, "An enum member was added. ToString and other reflection methods work only after the next full recompilation. Additionally, changes to the enum order may not apply until you patch usages in other places of the code."},
|
||||
{PartiallySupportedChange.EditFieldInitializer, "A field initializer was edited. Changes will only apply to new instances of that type, since the initializer for an object only runs when it is created."},
|
||||
{PartiallySupportedChange.AddMethodWithAttributes, "A method with attributes was added. Method attributes will not have any effect until the next full recompilation."},
|
||||
{PartiallySupportedChange.AddFieldWithAttributes, "A field with attributes was added. Field attributes will not have any effect until the next full recompilation."},
|
||||
{PartiallySupportedChange.GenericMethodInGenericClass, "A generic method was edited. Usages in non-generic classes applied, but usages in the generic classes are not supported."},
|
||||
{PartiallySupportedChange.NewCustomSerializableField, "A new custom serializable field was added. The inspector will not notice this change until the next full recompilation."},
|
||||
{PartiallySupportedChange.MultipleFieldsEditedInTheSameType, "Multiple fields modified in the same type during a single patch. Their values have been reset."},
|
||||
public static Dictionary<PartiallySupportedChange, string> partiallySupportedChangeDescriptions => new Dictionary<PartiallySupportedChange, string> {
|
||||
{PartiallySupportedChange.LambdaClosure, Translations.Timeline.PartiallySupportedLambdaClosure},
|
||||
{PartiallySupportedChange.EditAsyncMethod, Translations.Timeline.PartiallySupportedEditAsyncMethod},
|
||||
{PartiallySupportedChange.AddMonobehaviourMethod, Translations.Timeline.PartiallySupportedAddMonobehaviourMethod},
|
||||
{PartiallySupportedChange.EditMonobehaviourField, Translations.Timeline.PartiallySupportedEditMonobehaviourField},
|
||||
{PartiallySupportedChange.EditCoroutine, Translations.Timeline.PartiallySupportedEditCoroutine},
|
||||
{PartiallySupportedChange.EditGenericFieldInitializer, Translations.Timeline.PartiallySupportedEditGenericFieldInitializer},
|
||||
{PartiallySupportedChange.AddEnumMember, Translations.Timeline.PartiallySupportedAddEnumMember},
|
||||
{PartiallySupportedChange.EditFieldInitializer, Translations.Timeline.PartiallySupportedEditFieldInitializer},
|
||||
{PartiallySupportedChange.AddMethodWithAttributes, Translations.Timeline.PartiallySupportedAddMethodWithAttributes},
|
||||
{PartiallySupportedChange.AddFieldWithAttributes, Translations.Timeline.PartiallySupportedAddFieldWithAttributes},
|
||||
{PartiallySupportedChange.GenericMethodInGenericClass, Translations.Timeline.PartiallySupportedGenericMethodInGenericClass},
|
||||
{PartiallySupportedChange.NewCustomSerializableField, Translations.Timeline.PartiallySupportedNewCustomSerializableField},
|
||||
{PartiallySupportedChange.MultipleFieldsEditedInTheSameType, Translations.Timeline.PartiallySupportedMultipleFieldsEditedInTheSameType},
|
||||
};
|
||||
#pragma warning restore CS0612
|
||||
|
||||
@@ -215,7 +216,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
internal static int CompileErrorsCount => EventsTimeline.Count(alert => alert.alertType == AlertType.CompileError);
|
||||
internal static int AppliedChangesCount => EventsTimeline.Count(alert => alert.alertType == AlertType.AppliedChange);
|
||||
|
||||
static Regex shortDescriptionRegex = new Regex(@"^(\w+)\s(\w+)(?=:)", RegexOptions.Compiled);
|
||||
static Regex shortDescriptionRegex = new Regex(PackageConst.DefaultLocale == Locale.SimplifiedChinese ? @"^([\p{L}\p{N}_]+)\s([\p{L}\p{N}_]+)(?=:)" : @"^(\w+)\s(\w+)(?=:)", RegexOptions.Compiled);
|
||||
|
||||
internal static int GetRunTabTimelineEventCount() {
|
||||
int total = 0;
|
||||
@@ -240,7 +241,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
internal static List<AlertEntry> expandedEntries = new List<AlertEntry>();
|
||||
|
||||
internal static void RenderCompileButton() {
|
||||
if (GUILayout.Button("Recompile", GUILayout.Width(80))) {
|
||||
if (GUILayout.Button(Translations.Common.ButtonRecompile.Trim(), GUILayout.Width(80))) {
|
||||
HotReloadRunTab.RecompileWithChecks();
|
||||
}
|
||||
}
|
||||
@@ -330,8 +331,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
? AlertType.CompileError
|
||||
: AlertType.UnsupportedChange;
|
||||
var title = errorString.Contains("error CS")
|
||||
? "Compile error"
|
||||
: "Unsupported change";
|
||||
? Translations.Utility.CompileError
|
||||
: Translations.Utility.UnsupportedChange;
|
||||
ErrorData errorData = ErrorData.GetErrorData(errorString);
|
||||
var description = errorData.error;
|
||||
string shortDescription = null;
|
||||
@@ -363,8 +364,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
var entry = new AlertEntry(
|
||||
timestamp: timestamp,
|
||||
alertType : AlertType.UnsupportedChange,
|
||||
title: "Failed applying patch to method",
|
||||
description: $"Some methods got inlined by the Unity compiler and cannot be patched by Hot Reload. Switch to Debug mode to avoid this problem.\n\n• {(truncated ? patchesList + "\n..." : patchesList)}",
|
||||
title: Translations.Timeline.EventTitleFailedApplyingPatch,
|
||||
description: $"{Translations.Timeline.EventDescriptionInlinedMethods}\n\n• {(truncated ? patchesList + "\n..." : patchesList)}",
|
||||
entryType: EntryType.Parent,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
@@ -388,13 +389,13 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
internal static void CreatePatchFailureEventEntry(string errorString, string methodName, string methodSimpleName = null, EntryType entryType = EntryType.Standalone, DateTime? createdAt = null) {
|
||||
var timestamp = createdAt ?? DateTime.Now;
|
||||
ErrorData errorData = ErrorData.GetErrorData(errorString);
|
||||
var title = $"Failed applying patch to method";
|
||||
var title = Translations.Timeline.EventTitleFailedApplyingPatch;
|
||||
Action actionData = () => RenderErrorEventActions(errorData.error, errorData);
|
||||
InsertEntry(new AlertEntry(
|
||||
timestamp: timestamp,
|
||||
alertType : AlertType.UnsupportedChange,
|
||||
title: title,
|
||||
description: $"{title}: {methodName}, tap here to see more.",
|
||||
description: string.Format(Translations.Timeline.EventDescriptionFailedApplyingPatchTapForMore, title, methodName),
|
||||
shortDescription: methodSimpleName,
|
||||
actionData: actionData,
|
||||
entryType: entryType,
|
||||
@@ -430,7 +431,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
title: EditorIndicationState.IndicationText[EditorIndicationState.IndicationStatus.Reloaded],
|
||||
description: patchedMethodsDisplayNames?.Length > 0
|
||||
? $"• {(truncated ? patchesList + "\n..." : patchesList)}"
|
||||
: "No issues found",
|
||||
: Translations.Timeline.EventDescriptionNoIssuesFound,
|
||||
entryType: patchedMethodsDisplayNames?.Length > 0 ? EntryType.Parent : EntryType.Standalone,
|
||||
alertData: new AlertData(
|
||||
AlertEntryType.PatchApplied,
|
||||
@@ -457,7 +458,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
timestamp: timestamp,
|
||||
alertType: AlertType.UnsupportedChange,
|
||||
title: EditorIndicationState.IndicationText[EditorIndicationState.IndicationStatus.Unsupported],
|
||||
description: patchedMembersDisplayNames?.Length > 0 ? $"• {(truncated ? patchesList + "\n...\n\nSee unsupported changes below" : patchesList + "\n\nSee unsupported changes below")}" : "See detailed entries below",
|
||||
description: patchedMembersDisplayNames?.Length > 0 ? $"• {(truncated ? patchesList + "\n...\n\n" + Translations.Timeline.EventDescriptionSeeUnsupportedChangesBelow : patchesList + "\n\n" + Translations.Timeline.EventDescriptionSeeUnsupportedChangesBelow)}" : Translations.Timeline.EventDescriptionSeeDetailedEntriesBelow,
|
||||
entryType: EntryType.Parent,
|
||||
alertData: new AlertData(AlertEntryType.Failure, createdAt: timestamp, entryType: EntryType.Parent, patchedMembersDisplayNames: patchedMembersDisplayNames)
|
||||
);
|
||||
@@ -479,7 +480,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
timestamp: timestamp,
|
||||
alertType: AlertType.PartiallySupportedChange,
|
||||
title: EditorIndicationState.IndicationText[EditorIndicationState.IndicationStatus.PartiallySupported],
|
||||
description: patchedMethodsDisplayNames?.Length > 0 ? $"• {(truncated ? patchesList + "\n...\n\nSee partially applied changes below" : patchesList + "\n\nSee partially applied changes below")}" : "See detailed entries below",
|
||||
description: patchedMethodsDisplayNames?.Length > 0 ? $"• {(truncated ? patchesList + "\n...\n\n" + Translations.Timeline.EventDescriptionSeePartiallyAppliedChangesBelow : patchesList + "\n\n" + Translations.Timeline.EventDescriptionSeePartiallyAppliedChangesBelow)}" : Translations.Timeline.EventDescriptionSeeDetailedEntriesBelow,
|
||||
entryType: EntryType.Parent,
|
||||
alertData: new AlertData(AlertEntryType.PartiallySupportedChange, createdAt: timestamp, entryType: EntryType.Parent, patchedMembersDisplayNames: patchedMethodsDisplayNames)
|
||||
);
|
||||
@@ -495,14 +496,13 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
timestamp: timestamp,
|
||||
alertType : AlertType.UndetectedChange,
|
||||
title: EditorIndicationState.IndicationText[EditorIndicationState.IndicationStatus.Undetected],
|
||||
description: "Code semantics didn't change (e.g. whitespace) or the change requires manual recompile.\n\n" +
|
||||
"Recompile to force-apply changes.",
|
||||
description: Translations.Timeline.EventDescriptionUndetectedChange,
|
||||
actionData: () => {
|
||||
GUILayout.Space(10f);
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
RenderCompileButton();
|
||||
GUILayout.FlexibleSpace();
|
||||
OpenURLButton.Render("Docs", Constants.UndetectedChangesURL);
|
||||
OpenURLButton.Render(Translations.Suggestions.ButtonDocs, Constants.UndetectedChangesURL);
|
||||
GUILayout.Space(10f);
|
||||
}
|
||||
},
|
||||
@@ -520,7 +520,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
InsertEntry(new AlertEntry(
|
||||
timestamp: timestamp,
|
||||
alertType : AlertType.PartiallySupportedChange,
|
||||
title : detailed ? "Change partially applied" : ToString(partiallySupportedChange),
|
||||
title : detailed ? Translations.Timeline.EventTitleChangePartiallyApplied : ToString(partiallySupportedChange),
|
||||
description : description,
|
||||
shortDescription: detailed ? ToString(partiallySupportedChange) : null,
|
||||
actionData: () => {
|
||||
@@ -529,7 +529,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
RenderCompileButton();
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GetPartiallySupportedChangePref(partiallySupportedChange)) {
|
||||
if (GUILayout.Button("Ignore this event type ", HotReloadWindowStyles.LinkStyle)) {
|
||||
if (GUILayout.Button(Translations.Timeline.ButtonIgnoreEventType, HotReloadWindowStyles.LinkStyle)) {
|
||||
HidePartiallySupportedChange(partiallySupportedChange);
|
||||
HotReloadRunTab.RepaintInstant();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using UnityEditor.Overlays;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor;
|
||||
@@ -8,7 +9,7 @@ using UnityEngine;
|
||||
using UnityEditor.Toolbars;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
[Overlay(typeof(SceneView), "Hot Reload", true)]
|
||||
[Overlay(typeof(SceneView), Translations.MenuItems.OverlayDescription, true)]
|
||||
[Icon("Assets/HotReload/Editor/Resources/Icon_DarkMode.png")]
|
||||
internal class HotReloadOverlay : ToolbarOverlay {
|
||||
HotReloadOverlay() : base(HotReloadToolbarIndicationButton.id, HotReloadToolbarEventsButton.id, HotReloadToolbarRecompileButton.id) {
|
||||
@@ -59,7 +60,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
|
||||
internal HotReloadToolbarEventsButton() {
|
||||
icon = HotReloadState.ShowingRedDot ? GUIHelper.GetInvertibleIcon(InvertibleIcon.EventsNew) : GUIHelper.GetInvertibleIcon(InvertibleIcon.Events);
|
||||
tooltip = "Events";
|
||||
tooltip = Translations.Timeline.EventsTooltip;
|
||||
clicked += OnClick;
|
||||
EditorApplication.update += Update;
|
||||
}
|
||||
@@ -91,7 +92,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
private Texture2D refreshIcon => GUIHelper.GetInvertibleIcon(InvertibleIcon.Recompile);
|
||||
internal HotReloadToolbarRecompileButton() {
|
||||
icon = refreshIcon;
|
||||
tooltip = "Recompile";
|
||||
tooltip = Translations.Miscellaneous.OverlayTooltipRecompile;
|
||||
clicked += HotReloadRunTab.RecompileWithChecks;
|
||||
}
|
||||
}
|
||||
@@ -116,7 +117,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
/// Create Hot Reload overlay panel.
|
||||
/// </summary>
|
||||
public override VisualElement CreatePanelContent() {
|
||||
var root = new VisualElement() { name = "Hot Reload Indication" };
|
||||
var root = new VisualElement() { name = Translations.UI.OverlayPanelName };
|
||||
root.style.flexDirection = FlexDirection.Row;
|
||||
|
||||
indicationIcon = new Image() { image = GUIHelper.GetLocalIcon(EditorIndicationState.greyIconPath) };
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
private const string AutoRecompileUnsupportedChangesImmediatelyKey = "HotReloadWindow.AutoRecompileUnsupportedChangesImmediately";
|
||||
private const string AutoRecompileUnsupportedChangesOnExitPlayModeKey = "HotReloadWindow.AutoRecompileUnsupportedChangesOnExitPlayMode";
|
||||
private const string AutoRecompileUnsupportedChangesInPlayModeKey = "HotReloadWindow.AutoRecompileUnsupportedChangesInPlayMode";
|
||||
private const string AutoRecompileUnsupportedChangesInEditModeKey = "HotReloadWindow.AutoRecompileUnsupportedChangesInEditMode";
|
||||
private const string AutoRecompileInspectorFieldsEditKey = "HotReloadWindow.AutoRecompileInspectorFieldsEdit";
|
||||
private const string AllowDisableUnityAutoRefreshKey = "HotReloadWindow.AllowDisableUnityAutoRefresh";
|
||||
private const string DefaultAutoRefreshKey = "HotReloadWindow.DefaultAutoRefresh";
|
||||
private const string DefaultAutoRefreshModeKey = "HotReloadWindow.DefaultAutoRefreshMode";
|
||||
@@ -56,6 +58,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
private const string DisableConsoleWindowKey = "HotReloadWindow.DisableConsoleWindow";
|
||||
private const string DisableDetailedErrorReportingKey = "HotReloadWindow.DisableDetailedErrorReporting";
|
||||
private const string DebuggerCompatibilityEnabledKey = "HotReloadWindow.DebuggerCompatibilityEnabled";
|
||||
private const string PauseHotReloadInEditModeKey = "HotReloadWindow.PauseHotReloadInEditMode";
|
||||
private const string RedeemLicenseEmailKey = "HotReloadWindow.RedeemLicenseEmail";
|
||||
private const string RedeemLicenseInvoiceKey = "HotReloadWindow.RedeemLicenseInvoice";
|
||||
private const string RunTabEventsSuggestionsFoldoutKey = "HotReloadWindow.RunTabEventsSuggestionsFoldout";
|
||||
@@ -70,6 +73,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
private const string LoggedInlinedMethodsDialogueKey = "HotReloadWindow.LoggedInlinedMethodsDialogue";
|
||||
private const string OpenedWindowAtLeastOnceKey = "HotReloadWindow.OpenedWindowAtLeastOnce";
|
||||
private const string DeactivateHotReloadKey = "HotReloadWindow.DeactivateHotReload";
|
||||
private const string ActiveLocaleKey = "HotReloadWindow.ActiveLocale";
|
||||
|
||||
public const string DontShowPromptForDownloadKey = "ServerDownloader.DontShowPromptForDownload";
|
||||
|
||||
@@ -318,6 +322,16 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
get { return EditorPrefs.GetBool(AutoRecompileUnsupportedChangesInPlayModeKey, false); }
|
||||
set { EditorPrefs.SetBool(AutoRecompileUnsupportedChangesInPlayModeKey, value); }
|
||||
}
|
||||
|
||||
public static bool AutoRecompileInspectorFieldsEdit {
|
||||
get { return EditorPrefs.GetBool(AutoRecompileInspectorFieldsEditKey, false); }
|
||||
set { EditorPrefs.SetBool(AutoRecompileInspectorFieldsEditKey, value); }
|
||||
}
|
||||
|
||||
public static bool AutoRecompileUnsupportedChangesInEditMode {
|
||||
get { return EditorPrefs.GetBool(AutoRecompileUnsupportedChangesInEditModeKey, true); }
|
||||
set { EditorPrefs.SetBool(AutoRecompileUnsupportedChangesInEditModeKey, value); }
|
||||
}
|
||||
|
||||
public static bool AllowDisableUnityAutoRefresh {
|
||||
get { return EditorPrefs.GetBool(AllowDisableUnityAutoRefreshKey, false); }
|
||||
@@ -470,9 +484,19 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
set { EditorPrefs.SetBool(DisableDetailedErrorReportingKey, value); }
|
||||
}
|
||||
|
||||
public static bool PauseHotReloadInEditMode {
|
||||
get { return EditorPrefs.GetBool(PauseHotReloadInEditModeKey, false); }
|
||||
set { EditorPrefs.SetBool(PauseHotReloadInEditModeKey, value); }
|
||||
}
|
||||
|
||||
public static bool AutoDisableHotReloadWithDebugger {
|
||||
get { return EditorPrefs.GetBool(DebuggerCompatibilityEnabledKey, true); }
|
||||
set { EditorPrefs.SetBool(DebuggerCompatibilityEnabledKey, value); }
|
||||
}
|
||||
|
||||
public static string ActiveLocale {
|
||||
get { return EditorPrefs.GetString(ActiveLocaleKey, PackageConst.DefaultLocale); }
|
||||
set { EditorPrefs.SetString(ActiveLocaleKey, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Cli;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
static class DownloadUtility {
|
||||
@@ -19,11 +22,11 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetPackagePrefix(string version) {
|
||||
public static string GetPackagePrefix(string version, string locale) {
|
||||
if (PackageConst.IsAssetStoreBuild) {
|
||||
return $"releases/asset-store/{version.Replace('.', '-')}";
|
||||
return $"releases/asset-store/{(locale == Locale.SimplifiedChinese ? "zh/" : "")}{version.Replace('.', '-')}";
|
||||
}
|
||||
return $"releases/{version.Replace('.', '-')}";
|
||||
return $"releases/{(locale == Locale.SimplifiedChinese ? "zh/" : "")}{version.Replace('.', '-')}";
|
||||
}
|
||||
|
||||
public static string GetDownloadUrl(string key) {
|
||||
@@ -34,11 +37,11 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
// Get the http headers first to examine the content length
|
||||
using (var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false)) {
|
||||
if (response.StatusCode != HttpStatusCode.OK) {
|
||||
throw new DownloadException($"Download failed with status code {response.StatusCode} and reason {response.ReasonPhrase}");
|
||||
throw new DownloadException(string.Format(Translations.Errors.ExceptionDownloadFailed, response.StatusCode, response.ReasonPhrase));
|
||||
}
|
||||
var contentLength = response.Content.Headers.ContentLength;
|
||||
if (!contentLength.HasValue) {
|
||||
throw new DownloadException("Download failed: Content length unknown");
|
||||
throw new DownloadException(Translations.Errors.ExceptionDownloadContentLengthUnknown);
|
||||
}
|
||||
|
||||
using (var fs = new FileStream(destinationFilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None))
|
||||
@@ -55,7 +58,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
await fs.FlushAsync().ConfigureAwait(false);
|
||||
if (fs.Length != contentLength.Value) {
|
||||
throw new DownloadException("Download failed: download file is corrupted");
|
||||
throw new DownloadException(Translations.Errors.ExceptionDownloadFileCorrupted);
|
||||
}
|
||||
return new DownloadResult(HttpStatusCode.OK, null);
|
||||
}
|
||||
@@ -66,11 +69,11 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
if (source == null)
|
||||
throw new ArgumentNullException(nameof(source));
|
||||
if (!source.CanRead)
|
||||
throw new ArgumentException("Has to be readable", nameof(source));
|
||||
throw new ArgumentException(Translations.Utility.StreamHasToBeReadable, nameof(source));
|
||||
if (destination == null)
|
||||
throw new ArgumentNullException(nameof(destination));
|
||||
if (!destination.CanWrite)
|
||||
throw new ArgumentException("Has to be writable", nameof(destination));
|
||||
throw new ArgumentException(Translations.Utility.StreamHasToBeWritable, nameof(destination));
|
||||
if (bufferSize < 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(bufferSize));
|
||||
|
||||
|
||||
@@ -7,9 +7,11 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.DTO;
|
||||
using SingularityGroup.HotReload.Editor.Cli;
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using SingularityGroup.HotReload.Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Translations = SingularityGroup.HotReload.Editor.Localization.Translations;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor {
|
||||
internal class ServerDownloader : IProgress<float> {
|
||||
@@ -80,7 +82,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
var error = $"{e.GetType().Name}: {e.Message}";
|
||||
errors = (errors ?? new HashSet<string>());
|
||||
if (errors.Add(error)) {
|
||||
Log.Warning($"Download attempt failed. If the issue persists please reach out to customer support for assistance. Exception: {error}");
|
||||
Log.Warning(Translations.Errors.ErrorDownloadFailed, error);
|
||||
}
|
||||
}
|
||||
if (!sucess) {
|
||||
@@ -96,7 +98,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
};
|
||||
// sending telemetry requires server to be running so we only attempt after server is downloaded
|
||||
RequestHelper.RequestEditorEventWithRetry(new Stat(StatSource.Client, StatLevel.Error, StatFeature.Editor, StatEventType.Download), data).Forget();
|
||||
Log.Info("Download succeeded!");
|
||||
Log.Info(Translations.Errors.ErrorDownloadSucceeded);
|
||||
}
|
||||
|
||||
const int ERROR_ALREADY_EXISTS = 0xB7;
|
||||
@@ -131,8 +133,7 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
|
||||
if (!File.Exists(customBinaryPath)) {
|
||||
Log.Warning($"unable to find server binary for platform '{cliController.PlatformName}' at '{customBinaryPath}'. " +
|
||||
$"Will proceed with downloading the binary (default behavior)");
|
||||
Log.Warning(Translations.Errors.ErrorServerBinaryNotFound, cliController.PlatformName, customBinaryPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -148,14 +149,15 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
}
|
||||
return true;
|
||||
} catch(IOException ex) {
|
||||
Log.Warning("encountered exception when copying server binary in the specified custom executable path '{0}':\n{1}", customBinaryPath, ex);
|
||||
Log.Warning(Translations.Errors.ErrorCopyingServerBinary, customBinaryPath, ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static string GetDownloadUrl(ICliController cliController) {
|
||||
const string version = PackageConst.ServerVersion;
|
||||
var key = $"{DownloadUtility.GetPackagePrefix(version)}/server/{cliController.PlatformName}/{cliController.BinaryFileName}";
|
||||
// NOTE: server is not translated at the moment so we always use english
|
||||
var key = $"{DownloadUtility.GetPackagePrefix(version, Locale.English)}/server/{cliController.PlatformName}/{cliController.BinaryFileName}";
|
||||
return DownloadUtility.GetDownloadUrl(key);
|
||||
}
|
||||
|
||||
@@ -165,18 +167,16 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
|
||||
public Task<bool> PromptForDownload() {
|
||||
if (EditorUtility.DisplayDialog(
|
||||
title: "Install platform specific components",
|
||||
message: InstallDescription,
|
||||
ok: "Install",
|
||||
cancel: "More Info")
|
||||
title: Translations.Dialogs.DialogTitleInstallComponents,
|
||||
message: Translations.Dialogs.DialogMessageInstallComponents,
|
||||
ok: Translations.Dialogs.DialogButtonInstall,
|
||||
cancel: Translations.Dialogs.DialogButtonMoreInfo)
|
||||
) {
|
||||
return EnsureDownloaded(HotReloadCli.controller, CancellationToken.None);
|
||||
}
|
||||
Application.OpenURL(Constants.AdditionalContentURL);
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
|
||||
public const string InstallDescription = "For Hot Reload to work, additional components specific to your operating system have to be installed";
|
||||
}
|
||||
|
||||
class DownloadResult {
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SingularityGroup.HotReload.Editor.Cli;
|
||||
using SingularityGroup.HotReload.Editor.Localization;
|
||||
using SingularityGroup.HotReload.RuntimeDependencies;
|
||||
using UnityEditor;
|
||||
#if UNITY_EDITOR_WIN
|
||||
@@ -18,17 +19,17 @@ namespace SingularityGroup.HotReload.Editor {
|
||||
string serverDir;
|
||||
if(!CliUtils.TryFindServerDir(out serverDir)) {
|
||||
progress?.Report(1);
|
||||
return "unable to locate hot reload package";
|
||||
return Translations.Utility.UnableToLocateHotReloadPackage;
|
||||
}
|
||||
var packageDir = Path.GetDirectoryName(Path.GetFullPath(serverDir));
|
||||
var cacheDir = Path.GetFullPath(PackageConst.LibraryCachePath);
|
||||
if(Path.GetPathRoot(packageDir) != Path.GetPathRoot(cacheDir)) {
|
||||
progress?.Report(1);
|
||||
return "unable to update package because it is located on a different drive than the unity project";
|
||||
return Translations.Utility.UnableToUpdatePackageDifferentDrive;
|
||||
}
|
||||
var updatedPackageCopy = BackupPackage(packageDir, version);
|
||||
|
||||
var key = $"{DownloadUtility.GetPackagePrefix(version)}/HotReload.zip";
|
||||
var key = $"{DownloadUtility.GetPackagePrefix(version, PackageConst.DefaultLocale)}/HotReload.zip";
|
||||
var url = DownloadUtility.GetDownloadUrl(key);
|
||||
var targetFileName = $"HotReload{version.Replace('.', '-')}.zip";
|
||||
var targetFilePath = CliUtils.GetTempDownloadFilePath(targetFileName);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c856b3b3ce5f41c7aaebf7b543be697a
|
||||
timeCreated: 1759652305
|
||||
@@ -0,0 +1,103 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class About {
|
||||
// Log Messages
|
||||
public static string LogNoLogsFound;
|
||||
public static string LogFailedOpeningLogFile;
|
||||
public static string LogBuildTargetSwitching;
|
||||
|
||||
// About/Help Tab
|
||||
public static string AboutTitle;
|
||||
public static string AboutDescription;
|
||||
public static string AboutVersionInfo;
|
||||
public static string AboutChangelog;
|
||||
public static string AboutFeatures;
|
||||
public static string AboutImprovements;
|
||||
public static string AboutFixes;
|
||||
public static string AboutToday;
|
||||
public static string AboutYesterday;
|
||||
public static string AboutDaysAgo;
|
||||
public static string AboutOneMonthAgo;
|
||||
public static string AboutMonthsAgo;
|
||||
public static string AboutOneYearAgo;
|
||||
public static string AboutYearsAgo;
|
||||
|
||||
// About Tab Buttons
|
||||
public static string ButtonDocumentation;
|
||||
public static string ButtonContact;
|
||||
public static string ButtonUnityForum;
|
||||
public static string ButtonReportIssue;
|
||||
public static string ButtonJoinDiscord;
|
||||
public static string ButtonSeeMore;
|
||||
public static string ButtonManageLicense;
|
||||
public static string ButtonManageAccount;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// Log Messages
|
||||
LogNoLogsFound = "No logs found";
|
||||
LogFailedOpeningLogFile = "Failed opening log file.";
|
||||
LogBuildTargetSwitching = "Build target is switching to {0}.";
|
||||
|
||||
// About/Help Tab
|
||||
AboutTitle = "Help";
|
||||
AboutDescription = "Info and support for Hot Reload for Unity.";
|
||||
AboutVersionInfo = " Hot Reload version {0}. ";
|
||||
AboutChangelog = "Changelog";
|
||||
AboutFeatures = "Features:";
|
||||
AboutImprovements = "Improvements:";
|
||||
AboutFixes = "Fixes:";
|
||||
AboutToday = "Today";
|
||||
AboutYesterday = "Yesterday";
|
||||
AboutDaysAgo = "{0} days ago";
|
||||
AboutOneMonthAgo = "one month ago";
|
||||
AboutMonthsAgo = "{0} months ago";
|
||||
AboutOneYearAgo = "one year ago";
|
||||
AboutYearsAgo = "{0} years ago";
|
||||
|
||||
// About Tab Buttons
|
||||
ButtonDocumentation = "Documentation";
|
||||
ButtonContact = "Contact";
|
||||
ButtonUnityForum = "Unity Forum";
|
||||
ButtonReportIssue = "Report issue";
|
||||
ButtonJoinDiscord = "Join Discord";
|
||||
ButtonSeeMore = "See More";
|
||||
ButtonManageLicense = "Manage License";
|
||||
ButtonManageAccount = "Manage Account";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// Log Messages
|
||||
LogNoLogsFound = "未找到日志";
|
||||
LogFailedOpeningLogFile = "打开日志文件失败。";
|
||||
LogBuildTargetSwitching = "构建目标正在切换到 {0}。";
|
||||
|
||||
// About/Help Tab
|
||||
AboutTitle = "帮助";
|
||||
AboutDescription = "Unity Hot Reload 的信息和支持。";
|
||||
AboutVersionInfo = " Hot Reload 版本 {0}。";
|
||||
AboutChangelog = "更新日志";
|
||||
AboutFeatures = "新功能:";
|
||||
AboutImprovements = "改进:";
|
||||
AboutFixes = "修复:";
|
||||
AboutToday = "今天";
|
||||
AboutYesterday = "昨天";
|
||||
AboutDaysAgo = "{0} 天前";
|
||||
AboutOneMonthAgo = "一个月前";
|
||||
AboutMonthsAgo = "{0} 个月前";
|
||||
AboutOneYearAgo = "一年前";
|
||||
AboutYearsAgo = "{0} 年前";
|
||||
|
||||
// About Tab Buttons
|
||||
ButtonDocumentation = "文档";
|
||||
ButtonContact = "联系我们";
|
||||
ButtonUnityForum = "Unity 论坛";
|
||||
ButtonReportIssue = "报告问题";
|
||||
ButtonJoinDiscord = "加入 Discord";
|
||||
ButtonSeeMore = "查看更多";
|
||||
ButtonManageLicense = "管理许可证";
|
||||
ButtonManageAccount = "管理帐户";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 155269da640bb89428bf5b3d415878c9
|
||||
@@ -0,0 +1,115 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class Common {
|
||||
// Common Buttons
|
||||
public static string ButtonSubmit;
|
||||
public static string ButtonHide;
|
||||
public static string ButtonClear;
|
||||
public static string ButtonStart;
|
||||
public static string ButtonStop;
|
||||
public static string ButtonRecompile;
|
||||
public static string ButtonProceed;
|
||||
public static string ButtonYes;
|
||||
public static string ButtonNo;
|
||||
public static string ButtonCancel;
|
||||
public static string ButtonOpenInBrowser;
|
||||
public static string ButtonLogin;
|
||||
public static string ButtonLogout;
|
||||
public static string ButtonRedeem;
|
||||
public static string ButtonSkip;
|
||||
public static string ButtonUpgrade;
|
||||
public static string ButtonFixAll;
|
||||
public static string ButtonGoBack;
|
||||
public static string ButtonActivatePromoCode;
|
||||
public static string ButtonActivateLicense;
|
||||
public static string ButtonOpenLogFile;
|
||||
public static string ButtonBrowseAllLogs;
|
||||
public static string ButtonInfo;
|
||||
public static string ButtonNotNow;
|
||||
public static string ButtonStopAndRecompile;
|
||||
|
||||
// Common Labels
|
||||
public static string LabelEmail;
|
||||
public static string LabelPassword;
|
||||
public static string LabelPromoCode;
|
||||
public static string LabelCompanySize;
|
||||
public static string LabelInvoiceNumber;
|
||||
public static string LabelShowOnStartup;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// Common Buttons
|
||||
ButtonSubmit = "Submit";
|
||||
ButtonHide = "Hide";
|
||||
ButtonClear = "Clear";
|
||||
ButtonStart = " Start";
|
||||
ButtonStop = " Stop";
|
||||
ButtonRecompile = " Recompile";
|
||||
ButtonProceed = "Proceed";
|
||||
ButtonYes = "Yes";
|
||||
ButtonNo = "No";
|
||||
ButtonCancel = "Cancel";
|
||||
ButtonOpenInBrowser = "Open in browser";
|
||||
ButtonLogin = "Login";
|
||||
ButtonLogout = "Logout";
|
||||
ButtonRedeem = "Redeem";
|
||||
ButtonSkip = "Skip";
|
||||
ButtonUpgrade = "Upgrade";
|
||||
ButtonFixAll = "Fix All";
|
||||
ButtonGoBack = "Go Back";
|
||||
ButtonActivatePromoCode = "Activate promo code";
|
||||
ButtonActivateLicense = "Activate License";
|
||||
ButtonOpenLogFile = "Open Log File";
|
||||
ButtonBrowseAllLogs = "Browse all logs";
|
||||
ButtonInfo = " Info";
|
||||
ButtonNotNow = "Not now";
|
||||
ButtonStopAndRecompile = "Stop and Recompile";
|
||||
|
||||
// Common Labels
|
||||
LabelEmail = "Email";
|
||||
LabelPassword = "Password";
|
||||
LabelPromoCode = "Promo code";
|
||||
LabelCompanySize = "Company size (number of employees)";
|
||||
LabelInvoiceNumber = "Invoice number/Order ID";
|
||||
LabelShowOnStartup = "Show On Startup";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// Common Buttons
|
||||
ButtonSubmit = "提交";
|
||||
ButtonHide = "隐藏";
|
||||
ButtonClear = "清除";
|
||||
ButtonStart = " 开始";
|
||||
ButtonStop = " 停止";
|
||||
ButtonRecompile = " 重新编译";
|
||||
ButtonProceed = "继续";
|
||||
ButtonYes = "是";
|
||||
ButtonNo = "否";
|
||||
ButtonCancel = "取消";
|
||||
ButtonOpenInBrowser = "在浏览器中打开";
|
||||
ButtonLogin = "登录";
|
||||
ButtonLogout = "登出";
|
||||
ButtonRedeem = "兑换";
|
||||
ButtonSkip = "跳过";
|
||||
ButtonUpgrade = "升级";
|
||||
ButtonFixAll = "全部修复";
|
||||
ButtonGoBack = "返回";
|
||||
ButtonActivatePromoCode = "激活促销代码";
|
||||
ButtonActivateLicense = "激活许可证";
|
||||
ButtonOpenLogFile = "打开日志文件";
|
||||
ButtonBrowseAllLogs = "浏览所有日志";
|
||||
ButtonInfo = " 信息";
|
||||
ButtonNotNow = "以后再说";
|
||||
ButtonStopAndRecompile = "停止并重新编译";
|
||||
|
||||
// Common Labels
|
||||
LabelEmail = "电子邮件";
|
||||
LabelPassword = "密码";
|
||||
LabelPromoCode = "促销代码";
|
||||
LabelCompanySize = "公司规模(员工人数)";
|
||||
LabelInvoiceNumber = "发票号码/订单 ID";
|
||||
LabelShowOnStartup = "启动时显示";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fea73e8304102e4a805c3d00653b84b
|
||||
@@ -0,0 +1,139 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class Dialogs {
|
||||
// Dialogs
|
||||
public static string DialogTitleRecompile;
|
||||
public static string DialogMessageRecompile;
|
||||
public static string DialogTitleStopPlayMode;
|
||||
public static string DialogMessageStopPlayMode;
|
||||
public static string DialogTitleRecoverPassword;
|
||||
public static string DialogMessageRecoverPassword;
|
||||
public static string DialogTitleRateApp;
|
||||
public static string DialogMessageRateApp;
|
||||
public static string DialogTitleDeactivate;
|
||||
public static string DialogMessageDeactivate;
|
||||
public static string DialogButtonDeactivate;
|
||||
public static string DialogTitleRestartServer;
|
||||
public static string DialogMessageRestartAssetRefresh;
|
||||
public static string DialogMessageRestartConsoleWindow;
|
||||
public static string DialogMessageRestartErrorReporting;
|
||||
public static string DialogButtonRestartHotReload;
|
||||
public static string DialogButtonRestartServer;
|
||||
public static string DialogButtonDontRestart;
|
||||
public static string DialogTitleInstallComponents;
|
||||
public static string DialogMessageInstallComponents;
|
||||
public static string DialogButtonInstall;
|
||||
public static string DialogButtonMoreInfo;
|
||||
public static string DialogTitleSwitchBuildTarget;
|
||||
public static string DialogMessageSwitchBuildTarget;
|
||||
public static string DialogButtonSwitchToStandalone;
|
||||
|
||||
// About Tab Dialog Messages
|
||||
public static string DialogManageLicenseMessage;
|
||||
public static string DialogManageAccountMessage;
|
||||
public static string DialogReportIssueMessage;
|
||||
|
||||
// Update Dialog
|
||||
public static string DialogTitleUpdateFormat;
|
||||
public static string DialogMessageUpdateFormat;
|
||||
public static string DialogButtonUpdate;
|
||||
|
||||
// Update Server Dialog
|
||||
public static string DialogMessageRestartUpdate;
|
||||
public static string DialogMessageRestartFieldInitializer;
|
||||
public static string DialogMessageRestartExposeServer;
|
||||
public static string DialogTitleHotReload;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// Dialogs
|
||||
DialogTitleRecompile = "Hot Reload auto-applies changes";
|
||||
DialogMessageRecompile = "Using the Recompile button is only necessary when Hot Reload fails to apply your changes. \n\nDo you wish to proceed?";
|
||||
DialogTitleStopPlayMode = "Stop Play Mode and Recompile?";
|
||||
DialogMessageStopPlayMode = "Using the Recompile button will stop Play Mode.\n\nDo you wish to proceed?";
|
||||
DialogTitleRecoverPassword = "Recover password";
|
||||
DialogMessageRecoverPassword = "Use company code 'naughtycult' and the email you signed up with in order to recover your account.";
|
||||
DialogTitleRateApp = "Rate Hot Reload";
|
||||
DialogMessageRateApp = "Thank you for using Hot Reload!\n\nPlease consider leaving a review on the Asset Store to support us.";
|
||||
DialogTitleDeactivate = "Hot Reload";
|
||||
DialogMessageDeactivate = "Hot Reload will be completely deactivated (unusable) until you activate it again.\n\nDo you want to proceed?";
|
||||
DialogButtonDeactivate = "Deactivate";
|
||||
DialogTitleRestartServer = "Hot Reload";
|
||||
DialogMessageRestartAssetRefresh = "When changing 'Asset refresh', the Hot Reload server must be restarted for this to take effect.\nDo you want to restart it now?";
|
||||
DialogMessageRestartConsoleWindow = "When changing 'Hide console window on start', the Hot Reload server must be restarted for this to take effect.\nDo you want to restart it now?";
|
||||
DialogMessageRestartErrorReporting = "When changing 'Disable Detailed Error Reporting', the Hot Reload server must be restarted for this to take effect.\nDo you want to restart it now?";
|
||||
DialogButtonRestartHotReload = "Restart Hot Reload";
|
||||
DialogButtonRestartServer = "Restart server";
|
||||
DialogButtonDontRestart = "Don't restart";
|
||||
DialogTitleInstallComponents = "Install platform specific components";
|
||||
DialogMessageInstallComponents = "For Hot Reload to work, additional components specific to your operating system have to be installed";
|
||||
DialogButtonInstall = "Install";
|
||||
DialogButtonMoreInfo = "More Info";
|
||||
DialogTitleSwitchBuildTarget = "Switch Build Target";
|
||||
DialogMessageSwitchBuildTarget = "Switching the build target can take a while depending on project size.";
|
||||
DialogButtonSwitchToStandalone = "Switch to Standalone";
|
||||
|
||||
// About Tab Dialog Messages
|
||||
DialogManageLicenseMessage = "Upgrade/downgrade/edit your subscription and edit payment info.";
|
||||
DialogManageAccountMessage = "Login with company code 'naughtycult'. Use the email you signed up with. Your initial password was sent to you by email.";
|
||||
DialogReportIssueMessage = "Report issue in our public issue tracker. Requires gitlab.com account (if you don't have one and are not willing to make it, please contact us by other means such as our website).";
|
||||
|
||||
// Update Dialog
|
||||
DialogTitleUpdateFormat = "Update To v{0}";
|
||||
DialogMessageUpdateFormat = "By pressing 'Update' the Hot Reload package will be updated to v{0}";
|
||||
DialogButtonUpdate = "Update";
|
||||
|
||||
// Update Server Dialog
|
||||
DialogMessageRestartUpdate = "When updating Hot Reload, the server must be restarted for the update to take effect.\nDo you want to restart it now?";
|
||||
DialogMessageRestartFieldInitializer = "When changing 'Apply field initializer edits to existing class instances' setting, the Hot Reload server must restart for it to take effect.\nDo you want to restart it now?";
|
||||
DialogMessageRestartExposeServer = "When changing '{0}', the Hot Reload server must be restarted for this to take effect.\nDo you want to restart it now?";
|
||||
DialogTitleHotReload = "Hot Reload";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// Dialogs
|
||||
DialogTitleRecompile = "Hot Reload 自动应用更改";
|
||||
DialogMessageRecompile = "仅当 Hot Reload 未能应用您的更改时,才需要使用“重新编译”按钮。\n\n您希望继续吗?";
|
||||
DialogTitleStopPlayMode = "停止播放模式并重新编译?";
|
||||
DialogMessageStopPlayMode = "使用“重新编译”按钮将停止播放模式。\n\n您希望继续吗?";
|
||||
DialogTitleRecoverPassword = "恢复密码";
|
||||
DialogMessageRecoverPassword = "使用公司代码 'naughtycult' 和您注册时使用的电子邮件来恢复您的帐户。";
|
||||
DialogTitleRateApp = "为 Hot Reload 评分";
|
||||
DialogMessageRateApp = "感谢您使用 Hot Reload!\n\n请考虑在 Asset Store 上留下评论以支持我们。";
|
||||
DialogTitleDeactivate = "Hot Reload";
|
||||
DialogMessageDeactivate = "Hot Reload 将被完全停用(无法使用),直到您再次激活它。\n\n您希望继续吗?";
|
||||
DialogButtonDeactivate = "停用";
|
||||
DialogTitleRestartServer = "Hot Reload";
|
||||
DialogMessageRestartAssetRefresh = "更改“资源刷新”时,必须重新启动 Hot Reload 服务器才能生效。\n您希望现在重新启动吗?";
|
||||
DialogMessageRestartConsoleWindow = "更改“启动时隐藏控制台窗口”时,必须重新启动 Hot Reload 服务器才能生效。\n您希望现在重新启动吗?";
|
||||
DialogMessageRestartErrorReporting = "更改“禁用详细错误报告”时,必须重新启动 Hot Reload 服务器才能生效。\n您希望现在重新启动吗?";
|
||||
DialogButtonRestartHotReload = "重新启动 Hot Reload";
|
||||
DialogButtonRestartServer = "重新启动服务器";
|
||||
DialogButtonDontRestart = "不重新启动";
|
||||
DialogTitleInstallComponents = "安装特定于平台的组件";
|
||||
DialogMessageInstallComponents = "为了让 Hot Reload 工作,必须安装特定于您操作系统的附加组件";
|
||||
DialogButtonInstall = "安装";
|
||||
DialogButtonMoreInfo = "更多信息";
|
||||
DialogTitleSwitchBuildTarget = "切换构建目标";
|
||||
DialogMessageSwitchBuildTarget = "切换构建目标可能需要一段时间,具体取决于项目大小。";
|
||||
DialogButtonSwitchToStandalone = "切换到独立平台";
|
||||
|
||||
// About Tab Dialog Messages
|
||||
DialogManageLicenseMessage = "升级/降级/编辑您的订阅并编辑付款信息。";
|
||||
DialogManageAccountMessage = "使用公司代码 'naughtycult' 登录。使用您注册时使用的电子邮件。您的初始密码已通过电子邮件发送给您。";
|
||||
DialogReportIssueMessage = "在我们的公共问题跟踪器中报告问题。需要 gitlab.com 帐户(如果您没有并且不愿意创建,请通过其他方式与我们联系,例如我们的网站)。";
|
||||
|
||||
// Update Dialog
|
||||
DialogTitleUpdateFormat = "更新到 v{0}";
|
||||
DialogMessageUpdateFormat = "按下“更新”后,Hot Reload 软件包将更新到 v{0}";
|
||||
DialogButtonUpdate = "更新";
|
||||
|
||||
// Update Server Dialog
|
||||
DialogMessageRestartUpdate = "更新 Hot Reload 时,必须重新启动服务器才能使更新生效。\n您希望现在重新启动吗?";
|
||||
DialogMessageRestartFieldInitializer = "更改“将字段初始化程序编辑应用于现有类实例”设置时,必须重新启动 Hot Reload 服务器才能生效。\n您希望现在重新启动吗?";
|
||||
DialogMessageRestartExposeServer = "更改“{0}”时,必须重新启动 Hot Reload 服务器才能生效。\n您希望现在重新启动吗?";
|
||||
DialogTitleHotReload = "Hot Reload";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18bf971e42f1c6b40a2f22f0cc76411f
|
||||
@@ -0,0 +1,328 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class Errors {
|
||||
// Error Messages
|
||||
public static string ErrorInvalidInput;
|
||||
public static string ErrorNetworkIssue;
|
||||
public static string ErrorDownloadFailed;
|
||||
public static string ErrorServerBinaryNotFound;
|
||||
public static string ErrorCopyingServerBinary;
|
||||
public static string ErrorDownloadSucceeded;
|
||||
public static string ErrorContactSupport;
|
||||
public static string ErrorEnterNumber;
|
||||
public static string ErrorEnterEmail;
|
||||
public static string ErrorValidEmail;
|
||||
public static string ErrorEnterPassword;
|
||||
public static string ErrorMailExtensions;
|
||||
public static string ErrorEnterInvoiceNumber;
|
||||
public static string ErrorInvalidEmailAddress;
|
||||
public static string ErrorLicenseInvoiceRedeemed;
|
||||
public static string ErrorEmailAlreadyUsed;
|
||||
public static string ErrorInvoiceNotFound;
|
||||
public static string ErrorInvoiceRefunded;
|
||||
public static string ErrorPromoCodeInvalid;
|
||||
public static string ErrorPromoCodeUsed;
|
||||
public static string ErrorPromoCodeExpired;
|
||||
public static string ErrorLicenseExtended;
|
||||
public static string ErrorPromoCodeActivation;
|
||||
public static string ErrorPromoCodeNetwork;
|
||||
|
||||
// Warning Messages
|
||||
public static string WarningUnityJobHotReloaded;
|
||||
public static string WarningBuildSettingsNotSupported;
|
||||
public static string WarningInlinedMethods;
|
||||
public static string WarningMacOSVersionDetectionFailed;
|
||||
public static string WarningUnexpectedSaveProblem;
|
||||
public static string WarningRedeemStatusUnknown;
|
||||
public static string WarningRedeemUnknownError;
|
||||
public static string WarningFailedToRunServerCommand;
|
||||
public static string WarningVersionCheckException;
|
||||
public static string WarningVersionCheckFailed;
|
||||
public static string WarningUpdateIssueFailed;
|
||||
public static string WarningUpdatePackageFailed;
|
||||
public static string WarningUnableToFindPackage;
|
||||
public static string WarningCompileCheckerIssue;
|
||||
public static string WarningFailedToStartServer;
|
||||
public static string WarningNoSlnFileFound;
|
||||
public static string WarningPreparingBuildInfoFailed;
|
||||
public static string WarningInlineMethodChecker;
|
||||
public static string WarningRefreshingAssetFailed;
|
||||
public static string WarningFailedDeterminingRegistration;
|
||||
public static string WarningRedeemingLicenseFailed;
|
||||
public static string WarningInitializingEventEntries;
|
||||
public static string WarningPersistingEventEntries;
|
||||
public static string WarningIndicationTextNotFound;
|
||||
|
||||
// Info Messages
|
||||
public static string InfoDebuggerAttached;
|
||||
public static string InfoInspectorFieldRecompile;
|
||||
public static string InfoDefaultProjectGeneration;
|
||||
public static string ErrorFreeChargesUnavailable;
|
||||
|
||||
// Exception Messages
|
||||
public static string ExceptionExpectedZipFile;
|
||||
public static string ExceptionZipFileNotFound;
|
||||
public static string ExceptionUnzipFailed;
|
||||
public static string ExceptionDownloadFailed;
|
||||
public static string ExceptionUnableToFindManifest;
|
||||
public static string ErrorRedeemRequestFailed;
|
||||
public static string ErrorFailedDeserializingRedeem;
|
||||
public static string ErrorRedeemingWebException;
|
||||
public static string ExceptionDownloadContentLengthUnknown;
|
||||
public static string ExceptionDownloadFileCorrupted;
|
||||
public static string ExceptionFailedToFindAppDirectory;
|
||||
public static string ExceptionCouldNotStartCodePatcher;
|
||||
|
||||
// Info/Debug Messages
|
||||
public static string InfoManifestSearch;
|
||||
public static string InfoOmitProjectsForPlayerBuild;
|
||||
public static string InfoSeparator;
|
||||
public static string InfoOmittedEditorProject;
|
||||
public static string InfoFoundProjectNamed;
|
||||
|
||||
// Project Generation Warnings
|
||||
public static string WarningPostProcessorException;
|
||||
public static string WarningPostProcessorFailedProject;
|
||||
public static string WarningPostProcessorFailedSolution;
|
||||
public static string WarningPostProcessorNoDefaultConstructor;
|
||||
public static string WarningPostProcessorConstructorException;
|
||||
public static string WarningPostProcessorUnknownException;
|
||||
|
||||
// Parse Errors
|
||||
public static string ErrorParseError;
|
||||
|
||||
// Android Manifest Comments
|
||||
public static string CommentAndroidCleartextPermit;
|
||||
public static string CommentAndroidCleartextDevelopmentOnly;
|
||||
|
||||
// Debug Messages
|
||||
public static string DebugDetouringMethodFailed;
|
||||
|
||||
// Package Update Errors
|
||||
public static string ErrorRequestFailedStatusCode;
|
||||
public static string ErrorInvalidPackageJson;
|
||||
public static string ErrorInvalidVersionInPackageJson;
|
||||
public static string ErrorUnableToFindManifestJson;
|
||||
public static string ErrorNoDependenciesInManifest;
|
||||
public static string ErrorDependenciesNullInManifest;
|
||||
public static string ErrorNoDependenciesSpecified;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// Error Messages
|
||||
ErrorInvalidInput = "Invalid input";
|
||||
ErrorNetworkIssue = "Something went wrong. Please check your internet connection.";
|
||||
ErrorContactSupport = "Something went wrong. Please contact support if the issue persists.";
|
||||
ErrorDownloadFailed = "Download attempt failed. If the issue persists please reach out to customer support for assistance. Exception: {0}";
|
||||
ErrorServerBinaryNotFound = "unable to find server binary for platform '{0}' at '{1}'. Will proceed with downloading the binary (default behavior)";
|
||||
ErrorCopyingServerBinary = "encountered exception when copying server binary in the specified custom executable path '{0}':\n{1}";
|
||||
ErrorDownloadSucceeded = "Download succeeded!";
|
||||
ErrorEnterNumber = "Please enter a number.";
|
||||
ErrorEnterEmail = "Please enter your email address.";
|
||||
ErrorValidEmail = "Please enter a valid email address.";
|
||||
ErrorEnterPassword = "Please enter your password.";
|
||||
ErrorMailExtensions = "Mail extensions (in a form of 'username+suffix@example.com') are not supported yet. Please provide your original email address (such as 'username@example.com' without '+suffix' part) as we're working on resolving this issue.";
|
||||
ErrorEnterInvoiceNumber = "Please enter invoice number / order ID.";
|
||||
ErrorInvalidEmailAddress = "Please enter a valid email address.";
|
||||
ErrorLicenseInvoiceRedeemed = "The invoice number/order ID you're trying to use has already been applied to redeem a license. Please enter a different invoice number/order ID. If you have already redeemed a license for another email, you may proceed to the next step.";
|
||||
ErrorEmailAlreadyUsed = "The provided email has already been used to redeem a license. If you have previously redeemed a license, you can proceed to the next step and use your existing credentials. If not, please input a different email address.";
|
||||
ErrorInvoiceNotFound = "The invoice was not found. Please ensure that you've entered the correct invoice number/order ID.";
|
||||
ErrorInvoiceRefunded = "The purchase has been refunded. Please enter a different invoice number/order ID.";
|
||||
ErrorPromoCodeInvalid = "Your promo code is invalid. Please ensure that you have entered the correct promo code.";
|
||||
ErrorPromoCodeUsed = "Your promo code has already been used.";
|
||||
ErrorPromoCodeExpired = "Your promo code has expired.";
|
||||
ErrorLicenseExtended = "Your license has already been activated with a promo code. Only one promo code activation per license is allowed.";
|
||||
ErrorPromoCodeActivation = "We encountered an error while activating your promo code. Please try again. If the issue persists, please contact our customer support team for assistance.";
|
||||
ErrorPromoCodeNetwork = "There is an issue connecting to our servers. Please check your internet connection or contact customer support if the issue persists.";
|
||||
|
||||
// Warning Messages
|
||||
WarningUnityJobHotReloaded = "A unity job was hot reloaded. This will cause a harmless warning that can be ignored. More info about this can be found here: {0}";
|
||||
WarningBuildSettingsNotSupported = "Hot Reload was not included in the build because one or more build settings were not supported.";
|
||||
WarningInlinedMethods = "Unity Editor inlines simple methods when it's in \"Release\" mode, which Hot Reload cannot patch.\n\nSwitch to Debug mode to avoid this problem, or let Hot Reload fully recompile Unity when this issue occurs.";
|
||||
WarningMacOSVersionDetectionFailed = "Failed to detect MacOS version, if Hot Reload fails to start, please contact support.";
|
||||
WarningUnexpectedSaveProblem = "Unexpected problem unable to save HotReloadSettingsObject";
|
||||
WarningRedeemStatusUnknown = "Redeeming license failed: unknown status received";
|
||||
WarningRedeemUnknownError = "Redeeming a license failed: uknown error encountered";
|
||||
WarningFailedToRunServerCommand = "Failed to the run the start server command. ExitCode={0}\nFilepath: {1}";
|
||||
WarningVersionCheckException = "encountered exception when checking for new Hot Reload package version:\n{0}";
|
||||
WarningVersionCheckFailed = "version check failed: {0}";
|
||||
WarningUpdateIssueFailed = "Encountered issue when updating Hot Reload: {0}";
|
||||
WarningUpdatePackageFailed = "Failed to update package: {0}";
|
||||
WarningUnableToFindPackage = "Unable to find package. message: {0}";
|
||||
WarningCompileCheckerIssue = "compile checker encountered issue: {0} {1}";
|
||||
WarningFailedToStartServer = "Failed to start the Hot Reload Server. {0}";
|
||||
WarningNoSlnFileFound = "No .sln file found. Open any c# file to generate it so Hot Reload can work properly";
|
||||
WarningPreparingBuildInfoFailed = "Preparing build info failed! On-device functionality might not work. Exception: {0}";
|
||||
WarningInlineMethodChecker = "Inline method checker ran into an exception. Please contact support with the exception message to investigate the problem. Exception: {0}";
|
||||
WarningRefreshingAssetFailed = "Refreshing asset at path: {0} failed due to exception: {1}";
|
||||
WarningFailedDeterminingRegistration = "Failed determining registration outcome with {0}: {1}";
|
||||
WarningRedeemingLicenseFailed = "Redeeming a license failed with error: {0}";
|
||||
WarningInitializingEventEntries = "Failed initializing Hot Reload event entries on start: {0}";
|
||||
WarningPersistingEventEntries = "Failed persisting Hot Reload event entries: {0}";
|
||||
WarningIndicationTextNotFound = "Indication text not found for status {0}";
|
||||
|
||||
// Info Messages
|
||||
InfoDebuggerAttached = "Debugger was attached. Hot Reload may interfere with your debugger session. Recompiling in order to get full debugger experience.";
|
||||
InfoInspectorFieldRecompile = "Some inspector field changes require recompilation in Unity. Auto recompiling Unity according to the settings.";
|
||||
InfoDefaultProjectGeneration = "Using default project generation. If you encounter any problem with Unity's default project generation consider disabling it to use custom project generation.";
|
||||
ErrorFreeChargesUnavailable = "Free charges unavailabe. Please contact support if the issue persists.";
|
||||
|
||||
// Exception Messages
|
||||
ExceptionExpectedZipFile = "Expected to end with .zip, but it was: {0}";
|
||||
ExceptionZipFileNotFound = "zip file not found {0}";
|
||||
ExceptionUnzipFailed = "unzip failed with ExitCode {0}";
|
||||
ExceptionDownloadFailed = "Download failed with status code {0} and reason {1}";
|
||||
ExceptionUnableToFindManifest = "[{0}] Unable to find {1}";
|
||||
ErrorRedeemRequestFailed = "Redeem request failed. Status code: {0}, reason: {1}";
|
||||
ErrorFailedDeserializingRedeem = "Failed deserializing redeem response with exception: {0}: {1}";
|
||||
ErrorRedeemingWebException = "Redeeming license failed: WebException encountered {0}";
|
||||
ExceptionDownloadContentLengthUnknown = "Download failed: Content length unknown";
|
||||
ExceptionDownloadFileCorrupted = "Download failed: download file is corrupted";
|
||||
ExceptionFailedToFindAppDirectory = "Failed to find .app directory and move it to {0}";
|
||||
ExceptionCouldNotStartCodePatcher = "Could not start code patcher process.";
|
||||
|
||||
// Info/Debug Messages
|
||||
InfoManifestSearch = "Did not find {0} at {1}, searching for manifest file inside {2}";
|
||||
InfoOmitProjectsForPlayerBuild = "To compile C# files same as a Player build, we must omit projects which aren't part of the selected Player build.";
|
||||
InfoSeparator = "---------";
|
||||
InfoOmittedEditorProject = "omitted editor/other project named: {0}";
|
||||
InfoFoundProjectNamed = "found project named {0}";
|
||||
|
||||
// Project Generation Warnings
|
||||
WarningPostProcessorException = "Post processor '{0}' threw exception when calling OnGeneratedCSProjectFilesThreaded:\n{1}";
|
||||
WarningPostProcessorFailedProject = "Post processor '{0}' failed when processing project '{1}':\n{2}";
|
||||
WarningPostProcessorFailedSolution = "Post processor '{0}' failed when processing solution '{1}':\n{2}";
|
||||
WarningPostProcessorNoDefaultConstructor = "The type '{0}' was expected to have a public default constructor but it didn't";
|
||||
WarningPostProcessorConstructorException = "Exception occurred when invoking default constructor of '{0}':\n{1}";
|
||||
WarningPostProcessorUnknownException = "Unknown exception encountered when trying to create post processor '{0}':\n{1}";
|
||||
|
||||
// Parse Errors
|
||||
ErrorParseError = "{0} Parse Error : {1}";
|
||||
|
||||
// Android Manifest Comments
|
||||
CommentAndroidCleartextPermit = "[{0}] Added android:usesCleartextTraffic=\"true\" to permit connecting to the Hot Reload http server running on your machine.";
|
||||
CommentAndroidCleartextDevelopmentOnly = "[{0}] This change only happens in Unity development builds. You can disable this in the Hot Reload settings window.";
|
||||
|
||||
// Debug Messages
|
||||
DebugDetouringMethodFailed = "Detouring {0} method failed. {1} {2}";
|
||||
|
||||
// Package Update Errors
|
||||
ErrorRequestFailedStatusCode = "Request failed with statusCode: {0} {1}";
|
||||
ErrorInvalidPackageJson = "Invalid package.json";
|
||||
ErrorInvalidVersionInPackageJson = "Invalid version in package.json: '{0}'";
|
||||
ErrorUnableToFindManifestJson = "Unable to find manifest.json";
|
||||
ErrorNoDependenciesInManifest = "no dependencies object found in manifest.json";
|
||||
ErrorDependenciesNullInManifest = "dependencies object null in manifest.json";
|
||||
ErrorNoDependenciesSpecified = "no dependencies specified in manifest.json";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// Error Messages
|
||||
ErrorInvalidInput = "无效输入";
|
||||
ErrorNetworkIssue = "出现问题。请检查您的网络连接。";
|
||||
ErrorContactSupport = "出现问题。如果问题仍然存在,请联系支持。";
|
||||
ErrorDownloadFailed = "下载尝试失败。如果问题仍然存在,请联系客户支持寻求帮助。异常:{0}";
|
||||
ErrorServerBinaryNotFound = "无法在“{1}”找到平台“{0}”的服务器二进制文件。将继续下载二进制文件(默认行为)";
|
||||
ErrorCopyingServerBinary = "在指定的自定义可执行路径“{0}”中复制服务器二进制文件时遇到异常:\n{1}";
|
||||
ErrorDownloadSucceeded = "下载成功!";
|
||||
ErrorEnterNumber = "请输入一个数字。";
|
||||
ErrorEnterEmail = "请输入您的电子邮件地址。";
|
||||
ErrorValidEmail = "请输入有效的电子邮件地址。";
|
||||
ErrorEnterPassword = "请输入您的密码。";
|
||||
ErrorMailExtensions = "尚不支持邮件扩展(格式为'username+suffix@example.com')。请提供您原始的电子邮件地址(例如'username@example.com',不含'+suffix'部分),我们正在努力解决此问题。";
|
||||
ErrorEnterInvoiceNumber = "请输入发票号码/订单 ID。";
|
||||
ErrorInvalidEmailAddress = "请输入有效的电子邮件地址。";
|
||||
ErrorLicenseInvoiceRedeemed = "您尝试使用的发票号码/订单 ID 已用于兑换许可证。请输入不同的发票号码/订单 ID。如果您已经为另一个电子邮件兑换了许可证,您可以继续下一步。";
|
||||
ErrorEmailAlreadyUsed = "提供的电子邮件已用于兑换许可证。如果您之前已兑换许可证,您可以继续下一步并使用您现有的凭据。如果没有,请输入不同的电子邮件地址。";
|
||||
ErrorInvoiceNotFound = "未找到发票。请确保您输入了正确的发票号码/订单 ID。";
|
||||
ErrorInvoiceRefunded = "购买已退款。请输入不同的发票号码/订单 ID。";
|
||||
ErrorPromoCodeInvalid = "您的促销代码无效。请确保您输入了正确的促销代码。";
|
||||
ErrorPromoCodeUsed = "您的促销代码已被使用。";
|
||||
ErrorPromoCodeExpired = "您的促销代码已过期。";
|
||||
ErrorLicenseExtended = "您的许可证已使用促销代码激活。每个许可证只允许激活一次促销代码。";
|
||||
ErrorPromoCodeActivation = "激活您的促销代码时遇到错误。请重试。如果问题仍然存在,请联系我们的客户支持团队寻求帮助。";
|
||||
ErrorPromoCodeNetwork = "连接到我们的服务器时出现问题。请检查您的网络连接,如果问题仍然存在,请联系客户支持。";
|
||||
|
||||
// Warning Messages
|
||||
WarningUnityJobHotReloaded = "一个 unity 作业被热重载。这将导致一个可以忽略的无害警告。更多信息可以在这里找到:{0}";
|
||||
WarningBuildSettingsNotSupported = "由于一个或多个构建设置不受支持,Hot Reload 未包含在构建中。";
|
||||
WarningInlinedMethods = "Unity 编辑器在“发布”模式下会内联简单方法,Hot Reload 无法修补。\n\n切换到调试模式以避免此问题,或让 Hot Reload 在出现此问题时完全重新编译 Unity。";
|
||||
WarningMacOSVersionDetectionFailed = "检测 MacOS 版本失败,如果 Hot Reload 启动失败,请联系支持。";
|
||||
WarningUnexpectedSaveProblem = "无法保存 HotReloadSettingsObject 的意外问题";
|
||||
WarningRedeemStatusUnknown = "兑换许可证失败:收到未知状态";
|
||||
WarningRedeemUnknownError = "兑换许可证失败:遇到未知错误";
|
||||
WarningFailedToRunServerCommand = "运行启动服务器命令失败。退出代码={0}\n文件路径:{1}";
|
||||
WarningVersionCheckException = "检查新的 Hot Reload 软件包版本时遇到异常:\n{0}";
|
||||
WarningVersionCheckFailed = "版本检查失败:{0}";
|
||||
WarningUpdateIssueFailed = "更新 Hot Reload 时遇到问题:{0}";
|
||||
WarningUpdatePackageFailed = "更新软件包失败:{0}";
|
||||
WarningUnableToFindPackage = "无法找到软件包。消息:{0}";
|
||||
WarningCompileCheckerIssue = "编译检查器遇到问题:{0} {1}";
|
||||
WarningFailedToStartServer = "启动 Hot Reload 服务器失败。{0}";
|
||||
WarningNoSlnFileFound = "未找到 .sln 文件。打开任何 c# 文件以生成它,以便 Hot Reload 正常工作";
|
||||
WarningPreparingBuildInfoFailed = "准备构建信息失败!设备上功能可能无法工作。异常:{0}";
|
||||
WarningInlineMethodChecker = "内联方法检查器遇到异常。请联系支持并提供异常消息以调查问题。异常:{0}";
|
||||
WarningRefreshingAssetFailed = "刷新路径:{0} 的资产失败,原因异常:{1}";
|
||||
WarningFailedDeterminingRegistration = "确定注册结果失败,{0}:{1}";
|
||||
WarningRedeemingLicenseFailed = "兑换许可证失败,错误:{0}";
|
||||
WarningInitializingEventEntries = "启动时初始化 Hot Reload 事件条目失败:{0}";
|
||||
WarningPersistingEventEntries = "持久化 Hot Reload 事件条目失败:{0}";
|
||||
WarningIndicationTextNotFound = "未找到状态 {0} 的指示文本";
|
||||
|
||||
// Info Messages
|
||||
InfoDebuggerAttached = "调试器已附加。Hot Reload 可能会干扰您的调试会话。正在重新编译以获得完整的调试器体验。";
|
||||
InfoInspectorFieldRecompile = "一些检查器字段更改需要 Unity 重新编译。根据设置自动重新编译 Unity。";
|
||||
InfoDefaultProjectGeneration = "使用默认项目生成。如果您遇到 Unity 默认项目生成的任何问题,请考虑禁用它以使用自定义项目生成。";
|
||||
ErrorFreeChargesUnavailable = "免费费用不可用。如果问题仍然存在,请联系支持。";
|
||||
|
||||
// Exception Messages
|
||||
ExceptionExpectedZipFile = "预期以 .zip 结尾,但它是:{0}";
|
||||
ExceptionZipFileNotFound = "未找到 zip 文件 {0}";
|
||||
ExceptionUnzipFailed = "解压缩失败,退出代码 {0}";
|
||||
ExceptionDownloadFailed = "下载失败,状态码 {0},原因 {1}";
|
||||
ExceptionUnableToFindManifest = "[{0}] 无法找到 {1}";
|
||||
ErrorRedeemRequestFailed = "兑换请求失败。状态码:{0},原因:{1}";
|
||||
ErrorFailedDeserializingRedeem = "反序列化兑换响应失败,异常:{0}:{1}";
|
||||
ErrorRedeemingWebException = "兑换许可证失败:遇到 WebException {0}";
|
||||
ExceptionDownloadContentLengthUnknown = "下载失败:内容长度未知";
|
||||
ExceptionDownloadFileCorrupted = "下载失败:下载文件已损坏";
|
||||
ExceptionFailedToFindAppDirectory = "未能找到 .app 目录并将其移动到 {0}";
|
||||
ExceptionCouldNotStartCodePatcher = "无法启动代码修补程序进程。";
|
||||
|
||||
// Info/Debug Messages
|
||||
InfoManifestSearch = "在 {1} 未找到 {0},正在 {2} 内搜索清单文件";
|
||||
InfoOmitProjectsForPlayerBuild = "要像 Player 构建一样编译 C# 文件,我们必须省略不属于所选 Player 构建的项目。";
|
||||
InfoSeparator = "---------";
|
||||
InfoOmittedEditorProject = "省略的编辑器/其他项目名为:{0}";
|
||||
InfoFoundProjectNamed = "找到名为 {0} 的项目";
|
||||
|
||||
// Project Generation Warnings
|
||||
WarningPostProcessorException = "后处理器“{0}”在调用 OnGeneratedCSProjectFilesThreaded 时引发异常:\n{1}";
|
||||
WarningPostProcessorFailedProject = "后处理器“{0}”在处理项目“{1}”时失败:\n{2}";
|
||||
WarningPostProcessorFailedSolution = "后处理器“{0}”在处理解决方案“{1}”时失败:\n{2}";
|
||||
WarningPostProcessorNoDefaultConstructor = "类型“{0}”应具有公共默认构造函数,但没有";
|
||||
WarningPostProcessorConstructorException = "调用“{0}”的默认构造函数时发生异常:\n{1}";
|
||||
WarningPostProcessorUnknownException = "尝试创建后处理器“{0}”时遇到未知异常:\n{1}";
|
||||
|
||||
// Parse Errors
|
||||
ErrorParseError = "{0} 解析错误:{1}";
|
||||
|
||||
// Android Manifest Comments
|
||||
CommentAndroidCleartextPermit = "[{0}] 添加了 android:usesCleartextTraffic=\"true\" 以允许连接到您机器上运行的 Hot Reload http 服务器。";
|
||||
CommentAndroidCleartextDevelopmentOnly = "[{0}] 此更改仅在 Unity 开发构建中发生。您可以在 Hot Reload 设置窗口中禁用此功能。";
|
||||
|
||||
// Debug Messages
|
||||
DebugDetouringMethodFailed = "Detouring {0} 方法失败。{1} {2}";
|
||||
|
||||
// Package Update Errors
|
||||
ErrorRequestFailedStatusCode = "请求失败,状态码:{0} {1}";
|
||||
ErrorInvalidPackageJson = "无效的 package.json";
|
||||
ErrorInvalidVersionInPackageJson = "package.json 中的版本无效:'{0}'";
|
||||
ErrorUnableToFindManifestJson = "无法找到 manifest.json";
|
||||
ErrorNoDependenciesInManifest = "在 manifest.json 中找不到依赖项对象";
|
||||
ErrorDependenciesNullInManifest = "manifest.json 中的依赖项对象为 null";
|
||||
ErrorNoDependenciesSpecified = "manifest.json 中未指定依赖项";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1ff9542af2fa0c4d8b9bfb9620e29a0
|
||||
@@ -0,0 +1,112 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class License {
|
||||
// License & Authentication
|
||||
public static string TitleHotReloadLimited;
|
||||
public static string TitleHotReloadLicense;
|
||||
public static string MessageTrialLicense;
|
||||
public static string MessageIndieLicenseActive;
|
||||
public static string MessageBusinessLicenseActive;
|
||||
public static string MessageLicenseWillRenew;
|
||||
public static string MessagePromoCodeActivated;
|
||||
public static string PromoCodesTitle;
|
||||
|
||||
// License Error Descriptions
|
||||
public static string LicenseErrorDeviceInUse;
|
||||
public static string LicenseErrorDeviceBlacklisted;
|
||||
public static string LicenseErrorIncorrectClock;
|
||||
public static string LicenseErrorActivation;
|
||||
public static string LicenseErrorDeleted;
|
||||
public static string LicenseErrorDisabled;
|
||||
public static string LicenseErrorExpired;
|
||||
public static string LicenseErrorInactive;
|
||||
public static string LicenseErrorCorrupted;
|
||||
public static string LicenseErrorNetwork;
|
||||
public static string LicenseErrorTrialExpired;
|
||||
public static string LicenseErrorInvalidCredentials;
|
||||
public static string LicenseErrorIncompatible;
|
||||
public static string LicenseErrorDefault;
|
||||
public static string LicenseErrorAssetStorePro;
|
||||
public static string LicenseErrorUnityPlusIndie;
|
||||
|
||||
// License Button Labels
|
||||
public static string LicenseButtonGetLicense;
|
||||
public static string LicenseButtonContactSupport;
|
||||
public static string LicenseButtonUpgradeLicense;
|
||||
public static string LicenseButtonManageLicense;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// License & Authentication
|
||||
TitleHotReloadLimited = "Hot Reload Limited";
|
||||
TitleHotReloadLicense = "Hot Reload License";
|
||||
MessageTrialLicense = "Using Trial license, valid until {0}";
|
||||
MessageIndieLicenseActive = " Indie license active";
|
||||
MessageBusinessLicenseActive = " Business license active";
|
||||
MessageLicenseWillRenew = "License will renew on {0}.";
|
||||
MessagePromoCodeActivated = "Your promo code has been successfully activated. Free trial has been extended by 3 months.";
|
||||
PromoCodesTitle = "Promo Codes";
|
||||
|
||||
// License Error Descriptions
|
||||
LicenseErrorDeviceInUse = "Another device is using your license. Please reach out to customer support for assistance.";
|
||||
LicenseErrorDeviceBlacklisted = "You device has been blacklisted.";
|
||||
LicenseErrorIncorrectClock = "Your license is not working because your computer's clock is incorrect. Please set the clock to the correct time to restore your license.";
|
||||
LicenseErrorActivation = "An error has occured while activating your license. Please contact customer support for assistance.";
|
||||
LicenseErrorDeleted = "Your license has been deleted. Please contact customer support for assistance.";
|
||||
LicenseErrorDisabled = "Your license has been disabled. Please contact customer support for assistance.";
|
||||
LicenseErrorExpired = "Your license has expired. Please renew your license subscription using the 'Upgrade License' button below and login with your email/password to activate your license.";
|
||||
LicenseErrorInactive = "Your license is currenty inactive. Please login with your email/password to activate your license.";
|
||||
LicenseErrorCorrupted = "Your license file was damaged or corrupted. Please login with your email/password to refresh your license file.";
|
||||
LicenseErrorNetwork = "There is an issue connecting to our servers. Please check your internet connection or contact customer support if the issue persists.";
|
||||
LicenseErrorTrialExpired = "Your trial has expired. Activate a license with unlimited usage or continue using the Free version. View available plans on our website.";
|
||||
LicenseErrorInvalidCredentials = "Incorrect email/password. You can find your initial password in the sign-up email.";
|
||||
LicenseErrorIncompatible = "Please upgrade your license to continue using hotreload with Unity Pro.";
|
||||
LicenseErrorDefault = "We apologize, an error happened while verifying your license. Please reach out to customer support for assistance.";
|
||||
LicenseErrorAssetStorePro = "Unity Pro/Enterprise users from company with your number of employees require a Business license. Please upgrade your license on our website.";
|
||||
LicenseErrorUnityPlusIndie = "Unity Plus users require an Indie license. Please upgrade your license on our website.";
|
||||
|
||||
// License Button Labels
|
||||
LicenseButtonGetLicense = "Get License";
|
||||
LicenseButtonContactSupport = "Contact Support";
|
||||
LicenseButtonUpgradeLicense = "Upgrade License";
|
||||
LicenseButtonManageLicense = "Manage License";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// License & Authentication
|
||||
TitleHotReloadLimited = "Hot Reload 有限";
|
||||
TitleHotReloadLicense = "Hot Reload 许可证";
|
||||
MessageTrialLicense = "正在使用试用许可证,有效期至 {0}";
|
||||
MessageIndieLicenseActive = " 独立开发者许可证已激活";
|
||||
MessageBusinessLicenseActive = " 商业许可证已激活";
|
||||
MessageLicenseWillRenew = "许可证将于 {0} 续订。";
|
||||
MessagePromoCodeActivated = "您的促销代码已成功激活。免费试用期已延长3个月。";
|
||||
PromoCodesTitle = "促销代码";
|
||||
|
||||
// License Error Descriptions
|
||||
LicenseErrorDeviceInUse = "另一台设备正在使用您的许可证。请联系客户支持寻求帮助。";
|
||||
LicenseErrorDeviceBlacklisted = "您的设备已被列入黑名单。";
|
||||
LicenseErrorIncorrectClock = "您的许可证无法工作,因为您的计算机时钟不正确。请将时钟设置为正确的时间以恢复您的许可证。";
|
||||
LicenseErrorActivation = "激活您的许可证时发生错误。请联系客户支持寻求帮助。";
|
||||
LicenseErrorDeleted = "您的许可证已被删除。请联系客户支持寻求帮助。";
|
||||
LicenseErrorDisabled = "您的许可证已被禁用。请联系客户支持寻求帮助。";
|
||||
LicenseErrorExpired = "您的许可证已过期。请使用下方的“升级许可证”按钮续订您的许可证订阅,并使用您的电子邮件/密码登录以激活您的许可证。";
|
||||
LicenseErrorInactive = "您的许可证当前未激活。请使用您的电子邮件/密码登录以激活您的许可证。";
|
||||
LicenseErrorCorrupted = "您的许可证文件已损坏或损坏。请使用您的电子邮件/密码登录以刷新您的许可证文件。";
|
||||
LicenseErrorNetwork = "连接到我们的服务器时出现问题。请检查您的网络连接,如果问题仍然存在,请联系客户支持。";
|
||||
LicenseErrorTrialExpired = "您的试用已过期。激活具有无限使用权的许可证或继续使用免费版本。在我们网站上查看可用计划。";
|
||||
LicenseErrorInvalidCredentials = "电子邮件/密码不正确。您可以在注册电子邮件中找到您的初始密码。";
|
||||
LicenseErrorIncompatible = "请升级您的许可证以继续在 Unity Pro 中使用 hotreload。";
|
||||
LicenseErrorDefault = "我们深表歉意,验证您的许可证时发生错误。请联系客户支持寻求帮助。";
|
||||
LicenseErrorAssetStorePro = "拥有您员工数量的公司中的 Unity Pro/Enterprise 用户需要商业许可证。请在我们的网站上升级您的许可证。";
|
||||
LicenseErrorUnityPlusIndie = "Unity Plus 用户需要独立开发者许可证。请在我们的网站上升级您的许可证。";
|
||||
|
||||
// License Button Labels
|
||||
LicenseButtonGetLicense = "获取许可证";
|
||||
LicenseButtonContactSupport = "联系支持";
|
||||
LicenseButtonUpgradeLicense = "升级许可证";
|
||||
LicenseButtonManageLicense = "管理许可证";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35d12621e71ef12458b3bbe48e047469
|
||||
@@ -0,0 +1,61 @@
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
[InitializeOnLoad]
|
||||
internal static partial class Translations {
|
||||
static string loadedLocale;
|
||||
static Translations() {
|
||||
LoadDefaultLocalization();
|
||||
}
|
||||
|
||||
public static void LoadDefaultLocalization() {
|
||||
LoadLocalization(PackageConst.DefaultLocale);
|
||||
}
|
||||
|
||||
static void LoadLocalization(string locale) {
|
||||
if (loadedLocale == locale) {
|
||||
return;
|
||||
}
|
||||
if (locale == Locale.SimplifiedChinese) {
|
||||
LoadSimplifiedChinese();
|
||||
} else {
|
||||
LoadEnglish();
|
||||
}
|
||||
loadedLocale = locale;
|
||||
}
|
||||
|
||||
static void LoadEnglish() {
|
||||
Common.LoadEnglish();
|
||||
Timeline.LoadEnglish();
|
||||
License.LoadEnglish();
|
||||
Errors.LoadEnglish();
|
||||
Registration.LoadEnglish();
|
||||
Dialogs.LoadEnglish();
|
||||
Settings.LoadEnglish();
|
||||
OnDevice.LoadEnglish();
|
||||
About.LoadEnglish();
|
||||
Miscellaneous.LoadEnglish();
|
||||
Suggestions.LoadEnglish();
|
||||
Utility.LoadEnglish();
|
||||
UI.LoadEnglish();
|
||||
}
|
||||
|
||||
static void LoadSimplifiedChinese() {
|
||||
Common.LoadSimplifiedChinese();
|
||||
Timeline.LoadSimplifiedChinese();
|
||||
License.LoadSimplifiedChinese();
|
||||
Errors.LoadSimplifiedChinese();
|
||||
Registration.LoadSimplifiedChinese();
|
||||
Dialogs.LoadSimplifiedChinese();
|
||||
Settings.LoadSimplifiedChinese();
|
||||
OnDevice.LoadSimplifiedChinese();
|
||||
About.LoadSimplifiedChinese();
|
||||
Miscellaneous.LoadSimplifiedChinese();
|
||||
Suggestions.LoadSimplifiedChinese();
|
||||
Utility.LoadSimplifiedChinese();
|
||||
UI.LoadSimplifiedChinese();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e39c1f768bb465fa48c1fe2c3dd4d75
|
||||
timeCreated: 1759652321
|
||||
@@ -0,0 +1,13 @@
|
||||
using SingularityGroup.HotReload.Localization;
|
||||
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class MenuItems {
|
||||
public const string OpenHotReload = PackageConst.DefaultLocale == Locale.SimplifiedChinese ? "Window/Hot Reload/打开 &#H" : "Window/Hot Reload/Open &#H";
|
||||
public const string RecompileHotReload = PackageConst.DefaultLocale == Locale.SimplifiedChinese ? "Window/Hot Reload/重新编译" : "Window/Hot Reload/Recompile";
|
||||
public const string OverlayDescription = PackageConst.DefaultLocale == Locale.SimplifiedChinese ? "Hot Reload" : "Hot Reload";
|
||||
public const string NotImplementedObsolete = PackageConst.DefaultLocale == Locale.SimplifiedChinese ? "未实现" : "Not implemented";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff31c47e148cfc243a9f2c173a058c3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,163 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class Miscellaneous {
|
||||
// Overlay/Toolbar
|
||||
public static string OverlayTooltipRecompile;
|
||||
|
||||
// Notifications
|
||||
public static string NotificationPatching;
|
||||
public static string NotificationNeedsRecompile;
|
||||
|
||||
// Update Button
|
||||
public static string ButtonUpdateToVersionFormat;
|
||||
public static string ButtonTroubleshooting;
|
||||
|
||||
// Rate App
|
||||
public static string RateAppQuestion;
|
||||
public static string RateAppThankYou;
|
||||
|
||||
// Compilation Messages
|
||||
public static string CompileErrorTapToSee;
|
||||
public static string UnsupportedChangeTapToSee;
|
||||
public static string TapToShowStacktrace;
|
||||
|
||||
// Link Messages
|
||||
public static string LinkForgotPassword;
|
||||
|
||||
// Changelog
|
||||
public static string ChangelogTitle;
|
||||
|
||||
// Daily Session
|
||||
public static string DailySessionStart;
|
||||
public static string DailySessionTimeHoursLeft;
|
||||
public static string DailySessionTimeMinutesLeft;
|
||||
public static string DailySessionNextSessionMinutes;
|
||||
public static string DailySessionNextSessionHours;
|
||||
|
||||
// Indication Status Messages
|
||||
public static string IndicationFinishRegistration;
|
||||
public static string IndicationStarted;
|
||||
public static string IndicationStopping;
|
||||
public static string IndicationStopped;
|
||||
public static string IndicationPaused;
|
||||
public static string IndicationInstalling;
|
||||
public static string IndicationStarting;
|
||||
public static string IndicationReloaded;
|
||||
public static string IndicationPartiallySupported;
|
||||
public static string IndicationUnsupported;
|
||||
public static string IndicationPatching;
|
||||
public static string IndicationCompiling;
|
||||
public static string IndicationCompileErrors;
|
||||
public static string IndicationActivationFailed;
|
||||
public static string IndicationLoading;
|
||||
public static string IndicationUndetected;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// Overlay/Toolbar
|
||||
OverlayTooltipRecompile = "Recompile";
|
||||
|
||||
// Notifications
|
||||
NotificationPatching = "[Hot Reload] Applying patches...";
|
||||
NotificationNeedsRecompile = "[Hot Reload] Unsupported Changes detected! Recompiling...";
|
||||
|
||||
// Update Button
|
||||
ButtonUpdateToVersionFormat = "Update To v{0}";
|
||||
ButtonTroubleshooting = "Troubleshooting";
|
||||
|
||||
// Rate App
|
||||
RateAppQuestion = "Are you enjoying using Hot Reload?";
|
||||
RateAppThankYou = "Thank you for using Hot Reload!\n\nPlease consider leaving a review on the Asset Store to support us.";
|
||||
|
||||
// Compilation Messages
|
||||
CompileErrorTapToSee = "Compile error, tap here to see more.";
|
||||
UnsupportedChangeTapToSee = "Unsupported change detected, tap here to see more.";
|
||||
TapToShowStacktrace = "Tap to show stacktrace";
|
||||
|
||||
// Link Messages
|
||||
LinkForgotPassword = "Forgot password?";
|
||||
|
||||
// Changelog
|
||||
ChangelogTitle = "Changelog";
|
||||
|
||||
// Daily Session
|
||||
DailySessionStart = "Daily Session: Make code changes to start";
|
||||
DailySessionTimeHoursLeft = "Daily Session: {0}h {1}m Left";
|
||||
DailySessionTimeMinutesLeft = "Daily Session: {1}m Left";
|
||||
DailySessionNextSessionMinutes = "Next Session: {1}m";
|
||||
DailySessionNextSessionHours = "Next Session: {0}h {1}m";
|
||||
|
||||
// Indication Status Messages
|
||||
IndicationFinishRegistration = "Finish Registration";
|
||||
IndicationStarted = "Waiting for code changes";
|
||||
IndicationStopping = "Stopping Hot Reload";
|
||||
IndicationStopped = "Hot Reload inactive";
|
||||
IndicationPaused = "Hot Reload paused";
|
||||
IndicationInstalling = "Installing";
|
||||
IndicationStarting = "Starting Hot Reload";
|
||||
IndicationReloaded = "Reload finished";
|
||||
IndicationPartiallySupported = "Changes partially applied";
|
||||
IndicationUnsupported = "Finished with warnings";
|
||||
IndicationPatching = "Reloading";
|
||||
IndicationCompiling = "Compiling";
|
||||
IndicationCompileErrors = "Scripts have compile errors";
|
||||
IndicationActivationFailed = "Activation failed";
|
||||
IndicationLoading = "Loading";
|
||||
IndicationUndetected = "No changes applied";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// Overlay/Toolbar
|
||||
OverlayTooltipRecompile = "重新编译";
|
||||
|
||||
// Notifications
|
||||
NotificationPatching = "[Hot Reload] 正在应用补丁...";
|
||||
NotificationNeedsRecompile = "[Hot Reload] 检测到不支持的更改!正在重新编译...";
|
||||
|
||||
// Update Button
|
||||
ButtonUpdateToVersionFormat = "更新到 v{0}";
|
||||
ButtonTroubleshooting = "疑难解答";
|
||||
|
||||
// Rate App
|
||||
RateAppQuestion = "您喜欢使用 Hot Reload 吗?";
|
||||
RateAppThankYou = "感谢您使用 Hot Reload!\n\n请考虑在 Asset Store 上留下评论以支持我们。";
|
||||
|
||||
// Compilation Messages
|
||||
CompileErrorTapToSee = "编译错误,点击此处查看更多。";
|
||||
UnsupportedChangeTapToSee = "检测到不支持的更改,点击此处查看更多。";
|
||||
TapToShowStacktrace = "点击以显示堆栈跟踪";
|
||||
|
||||
// Link Messages
|
||||
LinkForgotPassword = "忘记密码?";
|
||||
|
||||
// Changelog
|
||||
ChangelogTitle = "更新日志";
|
||||
|
||||
// Daily Session
|
||||
DailySessionStart = "每日会话:进行代码更改以开始";
|
||||
DailySessionTimeHoursLeft = "每日会话:剩余 {0}h {1}m";
|
||||
DailySessionTimeMinutesLeft = "每日会话:剩余 {1}m";
|
||||
DailySessionNextSessionMinutes = "下一会话:{1}m";
|
||||
DailySessionNextSessionHours = "下一会话:{0}h {1}m";
|
||||
|
||||
// Indication Status Messages
|
||||
IndicationFinishRegistration = "完成注册";
|
||||
IndicationStarted = "等待代码更改";
|
||||
IndicationStopping = "正在停止 Hot Reload";
|
||||
IndicationStopped = "Hot Reload 未激活";
|
||||
IndicationPaused = "Hot Reload 已暂停";
|
||||
IndicationInstalling = "正在安装";
|
||||
IndicationStarting = "正在启动 Hot Reload";
|
||||
IndicationReloaded = "重新加载完成";
|
||||
IndicationPartiallySupported = "更改部分应用";
|
||||
IndicationUnsupported = "完成但有警告";
|
||||
IndicationPatching = "正在重新加载";
|
||||
IndicationCompiling = "正在编译";
|
||||
IndicationCompileErrors = "脚本有编译错误";
|
||||
IndicationActivationFailed = "激活失败";
|
||||
IndicationLoading = "正在加载";
|
||||
IndicationUndetected = "未应用任何更改";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 839cc9c3fc3098d478a7450b4d23b907
|
||||
@@ -0,0 +1,61 @@
|
||||
namespace SingularityGroup.HotReload.Editor.Localization {
|
||||
internal static partial class Translations {
|
||||
public static class OnDevice {
|
||||
// On-Device Settings
|
||||
public static string OnDeviceHeadline;
|
||||
public static string OnDeviceManualConnectFormat;
|
||||
public static string OnDeviceManualConnectWithIP;
|
||||
public static string OnDeviceNetworkNote;
|
||||
public static string OnDeviceCheckHotReloadRunning;
|
||||
public static string OnDeviceCheckHotReloadNotRunning;
|
||||
public static string OnDeviceCheckEnableExposeServer;
|
||||
public static string OnDeviceCheckPlatformSelected;
|
||||
public static string OnDeviceCheckPlatformNotSupported;
|
||||
public static string OnDeviceCheckDevelopmentEnabled;
|
||||
public static string OnDeviceCheckEnableDevelopment;
|
||||
public static string OnDeviceCheckMonoBackend;
|
||||
public static string OnDeviceCheckSetMonoBackend;
|
||||
public static string OnDeviceCheckStrippingLevel;
|
||||
public static string OnDeviceCheckStrippingSolution;
|
||||
|
||||
public static void LoadEnglish() {
|
||||
// On-Device Settings
|
||||
OnDeviceHeadline = "Make changes to a build running on-device";
|
||||
OnDeviceManualConnectFormat = "If auto-pair fails, find your local IP in OS settings, and use this format to connect: '{ip}:{0}'";
|
||||
OnDeviceManualConnectWithIP = "If auto-pair fails, use this IP and port to connect: {0}:{1}\nMake sure you are on the same LAN/WiFi network";
|
||||
OnDeviceNetworkNote = "Make sure you are on the same LAN/WiFi network";
|
||||
OnDeviceCheckHotReloadRunning = "Hot Reload is running";
|
||||
OnDeviceCheckHotReloadNotRunning = "Hot Reload is not running";
|
||||
OnDeviceCheckEnableExposeServer = "Enable '{0}'";
|
||||
OnDeviceCheckPlatformSelected = "The {0} platform is selected";
|
||||
OnDeviceCheckPlatformNotSupported = "The current platform is {0} which is not supported";
|
||||
OnDeviceCheckDevelopmentEnabled = "Development Build is enabled";
|
||||
OnDeviceCheckEnableDevelopment = "Enable \"Development Build\"";
|
||||
OnDeviceCheckMonoBackend = "Scripting Backend is set to Mono";
|
||||
OnDeviceCheckSetMonoBackend = "Set Scripting Backend to Mono";
|
||||
OnDeviceCheckStrippingLevel = "Stripping Level = {0}";
|
||||
OnDeviceCheckStrippingSolution = "Code stripping needs to be disabled to ensure that all methods are available for patching.";
|
||||
}
|
||||
|
||||
public static void LoadSimplifiedChinese() {
|
||||
// On-Device Settings
|
||||
OnDeviceHeadline = "对在设备上运行的构建进行更改";
|
||||
OnDeviceManualConnectFormat = "如果自动配对失败,请在操作系统设置中找到您的本地 IP,并使用此格式进行连接:'{ip}:{0}'";
|
||||
OnDeviceManualConnectWithIP = "如果自动配对失败,请使用此 IP 和端口进行连接:{0}:{1}\n确保您在同一个局域网/WiFi 网络中";
|
||||
OnDeviceNetworkNote = "确保您在同一个局域网/WiFi 网络中";
|
||||
OnDeviceCheckHotReloadRunning = "Hot Reload 正在运行";
|
||||
OnDeviceCheckHotReloadNotRunning = "Hot Reload 未运行";
|
||||
OnDeviceCheckEnableExposeServer = "启用 '{0}'";
|
||||
OnDeviceCheckPlatformSelected = "已选择 {0} 平台";
|
||||
OnDeviceCheckPlatformNotSupported = "当前平台为 {0},不支持";
|
||||
OnDeviceCheckDevelopmentEnabled = "开发构建已启用";
|
||||
OnDeviceCheckEnableDevelopment = "启用“开发构建”";
|
||||
OnDeviceCheckMonoBackend = "脚本后端设置为 Mono";
|
||||
OnDeviceCheckSetMonoBackend = "将脚本后端设置为 Mono";
|
||||
OnDeviceCheckStrippingLevel = "剥离级别 = {0}";
|
||||
OnDeviceCheckStrippingSolution = "需要禁用代码剥离以确保所有方法都可用于修补。";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user