Compare commits
7 Commits
UIMainScre
...
find-the-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f427dbb6e7 | ||
|
|
2d5b6fae60 | ||
|
|
9a99405f4b | ||
|
|
b4b746de25 | ||
|
|
dd5aefcb49 | ||
|
|
c11ca05ea8 | ||
|
|
9f71b6a84a |
13
.claude/settings.local.json
Normal file
13
.claude/settings.local.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(nul)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(dir:*)",
|
||||
"Bash(findstr:*)",
|
||||
"Bash(move \"Assets\\Scripts\\TiltUI.cs\" \"Assets\\Scripts\\TiltUI.cs.DISABLED\")"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
}
|
||||
}
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -186,7 +186,6 @@ StyleCopReport.xml
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
@@ -305,7 +304,6 @@ PublishScripts/
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
@@ -501,3 +499,5 @@ FodyWeavers.xsd
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/unity,visualstudiocode,visualstudio,vim
|
||||
|
||||
|
||||
.utmp/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"components": [
|
||||
"Microsoft.VisualStudio.Workload.ManagedGame"
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,90 +0,0 @@
|
||||
%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: Mask 3 Default UI
|
||||
m_Shader: {fileID: 4800000, guid: 2fa3c67be732d4f38be87103967c4b10, type: 3}
|
||||
m_ValidKeywords:
|
||||
- UNITY_UI_ALPHACLIP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _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: 0}
|
||||
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}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _ClipRectRadii: {r: 50, g: 20, b: 20, a: 50}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 156 KiB |
@@ -1,226 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Rounded Rect Mask 2D</title>
|
||||
<link href="https://fonts.cdnfonts.com/css/inter" rel="stylesheet">
|
||||
<style>
|
||||
* {
|
||||
/* outline: 1px solid red; */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* THESE ENSURE THE WEBVIEW WILL BE OF CORRECT HEIGHT
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-family: 'Inter';
|
||||
background-color: #F7F5EB;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
body :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* FIXES SCROLLING
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
html,
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* MAIN STYLING
|
||||
* =======================================================================
|
||||
*/
|
||||
|
||||
:root {
|
||||
--default-text-color: #333333;
|
||||
--muted-text-color: #666666;
|
||||
--link-color: #f05675;
|
||||
|
||||
--muted-border-color: #dddddd;
|
||||
--muted-background-color: #eeeeee;
|
||||
|
||||
--codeblock-background-color: #222222;
|
||||
--codeblock-text-color: #ffffff;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 16px;
|
||||
|
||||
line-height: 1.5rem;
|
||||
color: var(--default-text-color);
|
||||
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.45rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
padding-bottom: 0.4rem;
|
||||
border-bottom: 1px solid var(--muted-border-color);
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
padding-inline-start: 1.8rem;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 2px;
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
del {
|
||||
color: var(--muted-text-color);
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 1rem;
|
||||
border-radius: 4px;
|
||||
|
||||
color: var(--codeblock-text-color);
|
||||
background-color: var(--codeblock-background-color);
|
||||
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code {
|
||||
background-color: var(--muted-background-color);
|
||||
padding: 0.1rem 0.4rem;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-inline: 0px;
|
||||
padding-block: 12px;
|
||||
padding-left: 16px;
|
||||
|
||||
color: var(--muted-text-color);
|
||||
border-left: 2px solid var(--muted-border-color);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
blockquote :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 0.6rem 1rem;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid var(--muted-border-color)
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 1rem;
|
||||
background-color: var(--muted-background-color);
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="rounded-rect-mask-2d">Rounded Rect Mask 2D</h1>
|
||||
<p><img src="./Resources/RRM2D_Banner.png" alt="screenshot" /><br />
|
||||
available on the <a href="https://assetstore.unity.com/packages/slug/326028" rel="noopener noreferrer" target="_blank">Asset Store</a></p>
|
||||
<h2 id="documentation">Documentation</h2>
|
||||
<p><img src="./Resources/RRM2D_ScreenshotScene.png" alt="screenshot" /></p>
|
||||
<h3 id="basics">Basics</h3>
|
||||
<ul>
|
||||
<li>All Graphics (<a href="https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/comp-UIVisual.html" rel="noopener noreferrer" target="_blank">Visuals</a> & <a href="https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/comp-UIInteraction.html" rel="noopener noreferrer" target="_blank">Interactions</a>) components child of the Rounded Mask need the <em>Default UI (Rounded Mask)</em> material to work.</li>
|
||||
<li>All TextMeshPro texts need the <em>TMP SDF-Mobile (Rounded Mask)</em> material inside the TMP_FontAsset that needs to work with the rounded corners. If your text is only clipped on the straight edges of the mask, they don't need to be changed.</li>
|
||||
<li>You will need one <em>Default UI (Rounded Mask)</em> material per RoundedRectMask2D radius configuration. If you always use the same corners throughout your project, you can use the Material provided in the package. Same for the TMP_FontAssets.</li>
|
||||
<li>If you have different radii in your project, either <strong>duplicate the materials</strong>, or tick the checkbox <strong>Clone maskable materials on Start</strong> to automatically create new instances of the materials (for both Default UI & TMP_FontAsset's material).</li>
|
||||
</ul>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<ul>
|
||||
<li>As Rounded RectMask2D uses a special UI shader to work, it can only be used with normal UI (ie: Images with no special material). If you have custom UI shaders for your UI you will need to tweak them to support the RoundedRectMask2D component (otherwise the corners will not be correctly clipped).</li>
|
||||
<li>Moreover, you will need one Material per corners configuration. If you always use the same values, you can use one Material for all of your UI, but otherwise, RoundedRectMask2D can auto instantiate your materials at runtime, allowing you to have any mask values.</li>
|
||||
<li>Softness doesn't work with RoundedRectMask2D. If you need softness in your mask, you will have to use both RoundedRectMask2D & a regular RectMask2D nested into each other.</li>
|
||||
</ul>
|
||||
<h3 id="custom-shaders">Custom Shaders</h3>
|
||||
<p>If you have custom UI shaders and would like them to work with the RoundedRectMask2D component, you will need to edit them, to support the feature. You can check how it's done in the custom Shaders (UI Default & TMP_SDF Mobile). <br />
|
||||
Here is what you need to do:</p>
|
||||
<ol>
|
||||
<li>Either move your shaders to the AntoineCherel/RoundedRectMask2D/Shaders folder, or copy & paste the <em>RoundedMaskCommon.hlsl</em> library to your custom shader's folder</li>
|
||||
<li>in the <em>Pass</em>, include the library <br />
|
||||
<code>#include "RoundedMaskCommon.hlsl"</code></li>
|
||||
<li>in the Vertex to Fragment or Vertext to Pixel struct, add <br />
|
||||
<code>float3 posLocal : TEXCOORD8;</code></li>
|
||||
<li>fill it in the V2F or V2P function <br />
|
||||
<code>OUT.posLocal = v.vertex.xyz;</code></li>
|
||||
<li>in the frag or pixel return function, replace the existing clipping method by<br />
|
||||
<code>clip( RMUnityUIClipRect(IN.posLocal.xy, _ClipRect, _ClipRectRadii) - 0.5);</code><br />
|
||||
all of these added lines should be encapsulated inside <code>#ifdef UNITY_UI_CLIP_RECT</code> statements.</li>
|
||||
</ol>
|
||||
<p>If something goes wrong double check with the implemented shaders inside the Shaders folder.<br />
|
||||
You can also reach out to me contact (at) antoinecherel.dev</p>
|
||||
<h2 id="credits">Credits</h2>
|
||||
<p>Unity Plugin, developped by <a href="https://www.antoinecherel.dev/" target="_blank">Antoine Cherel</a></p>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 529 B |
@@ -1,124 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ACRoundedRectMask
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom editor for the RoundedRectMask2D component.
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(RoundedRectMask2D), true)]
|
||||
[CanEditMultipleObjects]
|
||||
public class RoundedRectMask2DInspector : RectMask2DEditor
|
||||
{
|
||||
private static GUIContent radiusContent = new GUIContent("Corner Radius", "Determines the radius of the rect mask's corners.");
|
||||
private static GUIContent radiiContent = new GUIContent("Corner Radii", "Determines the radius of each corner of the rect mask.");
|
||||
private static GUIContent topLeftContent = new GUIContent("Top Left", "Local -X, +Y corner.");
|
||||
private static GUIContent topRightContent = new GUIContent("Top Right", "Local +X, +Y corner.");
|
||||
private static GUIContent bottomLeftContent = new GUIContent("Bottom Left", "Local -X, -Y corner.");
|
||||
private static GUIContent bottomRightContent = new GUIContent("Bottom Right", "Local +X, -Y corner.");
|
||||
private static bool showRadii = false;
|
||||
|
||||
private static GUIContent paddingContent = new GUIContent("Padding");
|
||||
private static GUIContent leftContent = new GUIContent("Left");
|
||||
private static GUIContent rightContent = new GUIContent("Right");
|
||||
private static GUIContent topContent = new GUIContent("Top");
|
||||
private static GUIContent bottomContent = new GUIContent("Bottom");
|
||||
private static bool showOffsets = false;
|
||||
|
||||
private SerializedProperty independentRadii;
|
||||
private SerializedProperty radii;
|
||||
private SerializedProperty padding;
|
||||
private SerializedProperty cloneMaterials;
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
independentRadii = serializedObject.FindProperty("independantRadii");
|
||||
radii = serializedObject.FindProperty("radii");
|
||||
padding = serializedObject.FindProperty("m_Padding");
|
||||
cloneMaterials = serializedObject.FindProperty("cloneMaskableMaterialsOnStart");
|
||||
|
||||
base.OnEnable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Renders a custom inspector GUI that displays radius options and hides softness properties.
|
||||
/// </summary>
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.PropertyField(independentRadii);
|
||||
|
||||
if (independentRadii.boolValue)
|
||||
{
|
||||
showRadii = EditorGUILayout.Foldout(showRadii, radiiContent, true);
|
||||
|
||||
|
||||
if (showRadii)
|
||||
{
|
||||
using (var check = new EditorGUI.ChangeCheckScope())
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
Vector4 newRadii = radii.vector4Value;
|
||||
|
||||
newRadii.x = Mathf.Max(0.0f, EditorGUILayout.FloatField(topLeftContent, newRadii.x));
|
||||
newRadii.y = Mathf.Max(0.0f, EditorGUILayout.FloatField(topRightContent, newRadii.y));
|
||||
newRadii.z = Mathf.Max(0.0f, EditorGUILayout.FloatField(bottomLeftContent, newRadii.z));
|
||||
newRadii.w = Mathf.Max(0.0f, EditorGUILayout.FloatField(bottomRightContent, newRadii.w));
|
||||
|
||||
if (check.changed)
|
||||
{
|
||||
radii.vector4Value = newRadii;
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var check = new EditorGUI.ChangeCheckScope())
|
||||
{
|
||||
float newRadius = radii.vector4Value.x;
|
||||
|
||||
newRadius = Mathf.Max(0.0f, EditorGUILayout.FloatField(radiusContent, newRadius));
|
||||
|
||||
if (check.changed)
|
||||
{
|
||||
Vector4 newRadii = radii.vector4Value;
|
||||
newRadii = Vector4.one * newRadius;
|
||||
radii.vector4Value = newRadii;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rather than call base.OnInspectorGUI() manually showing padding so that softness can be hidden since it is not supported by rounded rect masks.
|
||||
showOffsets = EditorGUILayout.Foldout(showOffsets, paddingContent, true);
|
||||
|
||||
if (showOffsets)
|
||||
{
|
||||
using (var check = new EditorGUI.ChangeCheckScope())
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
Vector4 newPadding = padding.vector4Value;
|
||||
|
||||
newPadding.x = EditorGUILayout.FloatField(leftContent, newPadding.x);
|
||||
newPadding.z = EditorGUILayout.FloatField(rightContent, newPadding.z);
|
||||
newPadding.w = EditorGUILayout.FloatField(topContent, newPadding.w);
|
||||
newPadding.y = EditorGUILayout.FloatField(bottomContent, newPadding.y);
|
||||
|
||||
if (check.changed)
|
||||
{
|
||||
padding.vector4Value = newPadding;
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(cloneMaterials);
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
%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: Default UI (RoundedMask)
|
||||
m_Shader: {fileID: 4800000, guid: 2fa3c67be732d4f38be87103967c4b10, type: 3}
|
||||
m_ValidKeywords:
|
||||
- UNITY_UI_ALPHACLIP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _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: 0}
|
||||
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}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _ClipRectRadii: {r: 20, g: 20, b: 20, a: 20}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
File diff suppressed because one or more lines are too long
@@ -1,359 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Reflection;
|
||||
using TMPro;
|
||||
|
||||
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
using UnityEngine.Pool;
|
||||
#endif
|
||||
|
||||
namespace ACRoundedRectMask
|
||||
{
|
||||
/// <summary>
|
||||
/// Overrides the RectMask2D.PerformClipping method to add extra checks before doing exhaustive culling on
|
||||
/// each maskable target.
|
||||
/// </summary>
|
||||
public class RoundedRectMask2D : RectMask2D
|
||||
{
|
||||
public static readonly string RadiiPropertyName = "_ClipRectRadii";
|
||||
|
||||
|
||||
[SerializeField]
|
||||
private bool independantRadii;
|
||||
[Tooltip("The four corner radii of the rounded rect. (x: top left, y: top right, z: bottom left, w: bottom right)")]
|
||||
[SerializeField]
|
||||
private Vector4 radii = Vector4.one * 10.0f;
|
||||
public Vector4 Radii
|
||||
{
|
||||
get => radii;
|
||||
set
|
||||
{
|
||||
radii = value;
|
||||
MaskUtilities.Notify2DMaskStateChanged(this);
|
||||
ForceClip = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Tooltip("If not set to true, you will need to handle that all masked UI elements have their own material instances")]
|
||||
[SerializeField]
|
||||
private bool cloneMaskableMaterialsOnStart = true;
|
||||
|
||||
private static int clipRectRadiiID = 0;
|
||||
|
||||
|
||||
private HashSet<IClippable> clipTargets = null;
|
||||
private HashSet<MaskableGraphic> maskableTargets = null;
|
||||
private int lastclipTargetsCount = 0;
|
||||
private int lastmaskableTargetsCount = 0;
|
||||
private bool shouldRecalculateClipRects = false;
|
||||
|
||||
private Canvas cachedCanvas = null;
|
||||
private Vector3[] cachedCorners = new Vector3[4];
|
||||
private Rect lastClipRectCanvasSpace = new Rect();
|
||||
private Vector2Int lastSoftness = new Vector2Int();
|
||||
private List<RectMask2D> clippers = new List<RectMask2D>();
|
||||
|
||||
#region MonoBehaviour Implementation
|
||||
/// <inheritdoc />
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
shouldRecalculateClipRects = true;
|
||||
ForceClip = true;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <inheritdoc />
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
shouldRecalculateClipRects = true;
|
||||
ForceClip = true;
|
||||
}
|
||||
#endif
|
||||
/// <inheritdoc />
|
||||
protected override void OnDidApplyAnimationProperties()
|
||||
{
|
||||
base.OnDidApplyAnimationProperties();
|
||||
|
||||
shouldRecalculateClipRects = true;
|
||||
ForceClip = true;
|
||||
}
|
||||
|
||||
#endregion MonoBehaviour Implementation
|
||||
|
||||
#region RectMask2D Implementation
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnTransformParentChanged()
|
||||
{
|
||||
base.OnTransformParentChanged();
|
||||
shouldRecalculateClipRects = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnCanvasHierarchyChanged()
|
||||
{
|
||||
cachedCanvas = null;
|
||||
base.OnCanvasHierarchyChanged();
|
||||
shouldRecalculateClipRects = true;
|
||||
}
|
||||
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
shouldRecalculateClipRects = true;
|
||||
PerformClipping();
|
||||
|
||||
if (cloneMaskableMaterialsOnStart && maskableTargets != null)
|
||||
{
|
||||
foreach (MaskableGraphic mg in maskableTargets)
|
||||
{
|
||||
if (mg.materialForRendering.Equals(mg.material))
|
||||
{
|
||||
Material m = new Material(mg.material);
|
||||
mg.material = m;
|
||||
}
|
||||
else if (mg is TMP_Text tmpText)
|
||||
{
|
||||
Material m = new Material(tmpText.fontMaterial);
|
||||
tmpText.fontMaterial = m;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[RoundedRectMask2d] Can't clone material for " + mg.name + ". This will result in same rounded corners for all assets sharing its materiel " + mg.materialForRendering);
|
||||
continue;
|
||||
}
|
||||
|
||||
OnSetClipRect(mg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Improves the base class method by:
|
||||
/// - Checks if the canvas renderer has moved before exhaustive culling.
|
||||
/// - Interleaves UpdateClipSoftness so objects are not iterated over twice.
|
||||
/// - Adds a OnSetClipRect callback for derived classes to use.
|
||||
/// </summary>
|
||||
public override void PerformClipping()
|
||||
{
|
||||
// Not calling the base class method intentionally to provide a more optimal version.
|
||||
//base.PerformClipping();
|
||||
|
||||
if (clipRectRadiiID == 0)
|
||||
{
|
||||
clipRectRadiiID = Shader.PropertyToID(RadiiPropertyName);
|
||||
}
|
||||
|
||||
|
||||
Initialize();
|
||||
|
||||
if (ReferenceEquals(Canvas, null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO See if an IsActive() test would work well here or whether it might cause unexpected side effects (re case 776771)
|
||||
|
||||
// if the parents are changed
|
||||
// or something similar we
|
||||
// do a recalculate here
|
||||
if (shouldRecalculateClipRects || ForceClip)
|
||||
{
|
||||
MaskUtilities.GetRectMasksForClip(this, clippers);
|
||||
shouldRecalculateClipRects = false;
|
||||
}
|
||||
|
||||
// get the compound rects from
|
||||
// the clippers that are valid
|
||||
bool validRect = true;
|
||||
Rect clipRect = Clipping.FindCullAndClipWorldRect(clippers, out validRect);
|
||||
|
||||
// If the mask is in ScreenSpaceOverlay/Camera render mode, its content is only rendered when its rect
|
||||
// overlaps that of the root canvas.
|
||||
RenderMode renderMode = Canvas.rootCanvas.renderMode;
|
||||
bool maskIsCulled =
|
||||
(renderMode == RenderMode.ScreenSpaceCamera || renderMode == RenderMode.ScreenSpaceOverlay) &&
|
||||
!clipRect.Overlaps(RootCanvasRect, true);
|
||||
|
||||
if (maskIsCulled)
|
||||
{
|
||||
// Children are only displayed when inside the mask. If the mask is culled, then the children
|
||||
// inside the mask are also culled. In that situation, we pass an invalid rect to allow callees
|
||||
// to avoid some processing.
|
||||
clipRect = Rect.zero;
|
||||
validRect = false;
|
||||
}
|
||||
|
||||
if (clipRect != lastClipRectCanvasSpace || softness != lastSoftness)
|
||||
{
|
||||
foreach (IClippable clipTarget in clipTargets)
|
||||
{
|
||||
clipTarget.SetClipRect(clipRect, validRect);
|
||||
clipTarget.SetClipSoftness(softness);
|
||||
}
|
||||
|
||||
foreach (MaskableGraphic maskableTarget in maskableTargets)
|
||||
{
|
||||
maskableTarget.SetClipRect(clipRect, validRect);
|
||||
maskableTarget.SetClipSoftness(softness);
|
||||
OnSetClipRect(maskableTarget);
|
||||
|
||||
maskableTarget.Cull(clipRect, validRect);
|
||||
}
|
||||
}
|
||||
else if (ForceClip)
|
||||
{
|
||||
foreach (IClippable clipTarget in clipTargets)
|
||||
{
|
||||
clipTarget.SetClipRect(clipRect, validRect);
|
||||
clipTarget.SetClipSoftness(softness);
|
||||
}
|
||||
|
||||
foreach (MaskableGraphic maskableTarget in maskableTargets)
|
||||
{
|
||||
maskableTarget.SetClipRect(clipRect, validRect);
|
||||
maskableTarget.SetClipSoftness(softness);
|
||||
OnSetClipRect(maskableTarget);
|
||||
|
||||
if (maskableTarget.canvasRenderer.hasMoved)
|
||||
{
|
||||
maskableTarget.Cull(clipRect, validRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (MaskableGraphic maskableTarget in maskableTargets)
|
||||
{
|
||||
if (!maskableTarget.canvasRenderer.hasMoved)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
maskableTarget.Cull(clipRect, validRect);
|
||||
}
|
||||
}
|
||||
|
||||
ForceClip = false;
|
||||
lastClipRectCanvasSpace = clipRect;
|
||||
lastSoftness = softness;
|
||||
}
|
||||
|
||||
#endregion RectMask2D Implementation
|
||||
|
||||
public bool ForceClip
|
||||
{
|
||||
get
|
||||
{
|
||||
// This is an imprecise check if a clip or mask target gets added then removed on the same frame.
|
||||
// But... the alternative is we reflect into m_ForceClip base member which would be a per frame allocation due to it being a value type.
|
||||
// If this check is return false negatives in your scenario, then set ForceClip to true.
|
||||
return clipTargets.Count != lastclipTargetsCount ||
|
||||
maskableTargets.Count != lastmaskableTargetsCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == true)
|
||||
{
|
||||
lastclipTargetsCount = 0;
|
||||
lastmaskableTargetsCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Initialize();
|
||||
|
||||
lastclipTargetsCount = clipTargets.Count;
|
||||
lastmaskableTargetsCount = maskableTargets.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback whenever the clip rect is mutated.
|
||||
/// </summary>
|
||||
protected virtual void OnSetClipRect(IClippable clippable)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback whenever the clip rect is mutated.
|
||||
/// </summary>
|
||||
protected virtual void OnSetClipRect(MaskableGraphic maskableTarget)
|
||||
{
|
||||
Material targetMaterial = maskableTarget.materialForRendering;
|
||||
|
||||
if (targetMaterial != null)
|
||||
{
|
||||
targetMaterial.SetVector(clipRectRadiiID, Radii);
|
||||
}
|
||||
|
||||
Debug.Log("Setting clip rect for " + maskableTarget.name);
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
// Check if we have already initialized.
|
||||
if (clipTargets != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Many of the properties we need access to for clipping are not exposed. So, we have to do reflection to get access to them.
|
||||
BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
|
||||
clipTargets = (HashSet<IClippable>)typeof(RectMask2D).GetField("m_ClipTargets", bindFlags).GetValue(this);
|
||||
maskableTargets = (HashSet<MaskableGraphic>)typeof(RectMask2D).GetField("m_MaskableTargets", bindFlags).GetValue(this);
|
||||
}
|
||||
|
||||
private Canvas Canvas
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cachedCanvas == null)
|
||||
{
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
var list = ListPool<Canvas>.Get();
|
||||
gameObject.GetComponentsInParent(false, list);
|
||||
if (list.Count > 0)
|
||||
cachedCanvas = list[list.Count - 1];
|
||||
else
|
||||
cachedCanvas = null;
|
||||
ListPool<Canvas>.Release(list);
|
||||
#else
|
||||
var list = gameObject.GetComponentsInParent<Canvas>(false);
|
||||
if (list.Length > 0)
|
||||
cachedCanvas = list[list.Length - 1];
|
||||
else
|
||||
cachedCanvas = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
return cachedCanvas;
|
||||
}
|
||||
}
|
||||
|
||||
private Rect RootCanvasRect
|
||||
{
|
||||
get
|
||||
{
|
||||
rectTransform.GetWorldCorners(cachedCorners);
|
||||
|
||||
if (!ReferenceEquals(Canvas, null))
|
||||
{
|
||||
Canvas rootCanvas = Canvas.rootCanvas;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
cachedCorners[i] = rootCanvas.transform.InverseTransformPoint(cachedCorners[i]);
|
||||
}
|
||||
|
||||
return new Rect(cachedCorners[0].x, cachedCorners[0].y, cachedCorners[2].x - cachedCorners[0].x, cachedCorners[2].y - cachedCorners[0].y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
#ifndef RM_COMMON
|
||||
#define RM_COMMON
|
||||
|
||||
/// <summary>
|
||||
/// Constants
|
||||
/// </summary>
|
||||
|
||||
#define RM_PI 3.14159265359
|
||||
#define RM_DEGREES_TO_RADIANS (RM_PI / 180.0)
|
||||
|
||||
#define RM_HALF_MIN 6.103515625e-5 // 2^-14, the same value for 10, 11 and 16-bit: https://www.khronos.org/opengl/wiki/Small_Float_Formats
|
||||
|
||||
#define RM_MIN_CORNER_VALUE 1e-3
|
||||
#define RM_MIN_CORNER_VALUE_RECT 1e-3
|
||||
|
||||
/// <summary>
|
||||
/// SDF methods.
|
||||
/// </summary>
|
||||
|
||||
inline float RMPointVsRoundedBox(in float2 position, in float2 cornerCircleDistance, in float cornerCircleRadius)
|
||||
{
|
||||
return length(max(abs(position) - cornerCircleDistance, 0.0)) - cornerCircleRadius;
|
||||
}
|
||||
|
||||
inline float FilterDistance(in float distance)
|
||||
{
|
||||
float pixelDistance = distance / fwidth(distance);
|
||||
|
||||
#if defined(_INDEPENDENT_CORNERS) || defined(_UI_CLIP_RECT_ROUNDED_INDEPENDENT)
|
||||
// To avoid artifacts at discontinuities in the SDF distance increase the pixel width.
|
||||
return saturate(1.0 - pixelDistance);
|
||||
#else
|
||||
return saturate(0.5 - pixelDistance);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline float RMRoundCornersSmooth(in float2 position, in float2 cornerCircleDistance, in float cornerCircleRadius, in float smoothingValue)
|
||||
{
|
||||
float distance = RMPointVsRoundedBox(position, cornerCircleDistance, cornerCircleRadius);
|
||||
#if defined(_EDGE_SMOOTHING_AUTOMATIC)
|
||||
return FilterDistance(distance);
|
||||
#else
|
||||
return smoothstep(1.0, 0.0, distance / smoothingValue);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline float RMRoundCorners(in float2 position, in float2 cornerCircleDistance, in float cornerCircleRadius, in float smoothingValue)
|
||||
{
|
||||
#if defined(_TRANSPARENT)
|
||||
return RMRoundCornersSmooth(position, cornerCircleDistance, cornerCircleRadius, smoothingValue);
|
||||
#else
|
||||
return (RMPointVsRoundedBox(position, cornerCircleDistance, cornerCircleRadius) < 0.0);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline float RMFindCornerRadius(in float2 uv, in float4 radii)
|
||||
{
|
||||
if (uv.x < 0.5)
|
||||
{
|
||||
if (uv.y > 0.5) { return radii.x; } // Top left.
|
||||
else { return radii.z; } // Bottom left.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (uv.y > 0.5) { return radii.y; } // Top right.
|
||||
else { return radii.w; } // Bottom right.
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnityUI methods.
|
||||
/// </summary>
|
||||
|
||||
inline float RMGet2DClippingRounded(in float2 position, in float4 clipRect, in float radius)
|
||||
{
|
||||
float2 halfSize = (clipRect.zw - clipRect.xy) * 0.5;
|
||||
float2 center = clipRect.xy + halfSize;
|
||||
float2 offset = position - center;
|
||||
|
||||
return RMPointVsRoundedBox(offset, halfSize - radius, radius);
|
||||
}
|
||||
|
||||
inline float RMGet2DClippingRoundedSoft(in float2 position, in float4 clipRect, in float radius)
|
||||
{
|
||||
return saturate(FilterDistance(RMGet2DClippingRounded(position, clipRect, radius)));
|
||||
}
|
||||
|
||||
inline float RMGet2DClippingRoundedIndependent(in float2 position, in float4 clipRect, in float4 radii)
|
||||
{
|
||||
float2 halfSize = (clipRect.zw - clipRect.xy) * 0.5;
|
||||
float2 center = clipRect.xy + halfSize;
|
||||
float2 offset = position - center;
|
||||
float radius = RMFindCornerRadius(offset, radii);
|
||||
|
||||
return RMPointVsRoundedBox(offset, halfSize - radius, radius);
|
||||
}
|
||||
|
||||
inline float RMGet2DClippingRoundedIndependentSoft(in float2 position, in float4 clipRect, in float4 radii)
|
||||
{
|
||||
return saturate(FilterDistance(RMGet2DClippingRoundedIndependent(position, clipRect, radii)));
|
||||
}
|
||||
|
||||
inline float RMUnityUIClipRect(in float2 position, in float4 clipRect, in float4 radii)
|
||||
{
|
||||
radii = max(radii, RM_MIN_CORNER_VALUE_RECT);
|
||||
#if defined(UNITY_UI_ALPHACLIP)
|
||||
return RMGet2DClippingRoundedIndependent(position, clipRect, radii) <= 0.0;
|
||||
#else
|
||||
return RMGet2DClippingRoundedIndependentSoft(position, clipRect, radii);
|
||||
#endif
|
||||
}
|
||||
#endif // RM_COMMON
|
||||
@@ -1,126 +0,0 @@
|
||||
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
|
||||
|
||||
Shader "RoundedMask/UI/Default (RoundedMask)"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
[HideInInspector] _ClipRect("Clip Rect", Vector) = (-32767.0, -32767.0, 32767.0, 32767.0)
|
||||
[HideInInspector] _ClipRectRadii("Clip Rect Radii", Vector) = (10.0, 10.0, 10.0, 10.0)
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "RoundedMaskCommon.hlsl"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
float3 posLocal : TEXCOORD8;
|
||||
#endif
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _ClipRectRadii;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert(appdata_t v)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
OUT.posLocal = v.vertex.xyz;
|
||||
#endif
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
clip( RMUnityUIClipRect(IN.posLocal.xy, _ClipRect, _ClipRectRadii) - 0.5);
|
||||
#endif
|
||||
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,249 +0,0 @@
|
||||
// Simplified SDF shader:
|
||||
// - No Shading Option (bevel / bump / env map)
|
||||
// - No Glow Option
|
||||
// - Softness is applied on both side of the outline
|
||||
|
||||
Shader "RoundedMask/TextMeshPro/Mobile/Distance Field (RoundedMask)" {
|
||||
|
||||
Properties {
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||
|
||||
_WeightNormal ("Weight Normal", float) = 0
|
||||
_WeightBold ("Weight Bold", float) = .5
|
||||
|
||||
_ShaderFlags ("Flags", float) = 0
|
||||
_ScaleRatioA ("Scale RatioA", float) = 1
|
||||
_ScaleRatioB ("Scale RatioB", float) = 1
|
||||
_ScaleRatioC ("Scale RatioC", float) = 1
|
||||
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_TextureWidth ("Texture Width", float) = 512
|
||||
_TextureHeight ("Texture Height", float) = 512
|
||||
_GradientScale ("Gradient Scale", float) = 5
|
||||
_ScaleX ("Scale X", float) = 1
|
||||
_ScaleY ("Scale Y", float) = 1
|
||||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
|
||||
_Sharpness ("Sharpness", Range(-1,1)) = 0
|
||||
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
[HideInInspector]
|
||||
_ClipRectRadii ("Clip Rect Radii", vector) = (10.0, 10.0, 10.0, 10.0)
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
}
|
||||
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull [_CullMode]
|
||||
ZWrite Off
|
||||
Lighting Off
|
||||
Fog { Mode Off }
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass {
|
||||
CGPROGRAM
|
||||
#pragma vertex VertShader
|
||||
#pragma fragment PixShader
|
||||
#pragma shader_feature __ OUTLINE_ON
|
||||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
#include "RoundedMaskCommon.hlsl"
|
||||
#include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct pixel_t {
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 faceColor : COLOR;
|
||||
fixed4 outlineColor : COLOR1;
|
||||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
|
||||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
|
||||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
|
||||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
|
||||
#endif
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
float3 posLocal : TEXCOORD8;
|
||||
#endif
|
||||
};
|
||||
|
||||
float4 _ClipRectRadii;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
pixel_t output;
|
||||
|
||||
UNITY_INITIALIZE_OUTPUT(pixel_t, output);
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
|
||||
float4 vert = input.vertex;
|
||||
vert.x += _VertexOffsetX;
|
||||
vert.y += _VertexOffsetY;
|
||||
float4 vPosition = UnityObjectToClipPos(vert);
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
|
||||
|
||||
float layerScale = scale;
|
||||
|
||||
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
|
||||
float bias = (0.5 - weight) * scale - 0.5;
|
||||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
|
||||
|
||||
float opacity = input.color.a;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
|
||||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
|
||||
faceColor.rgb *= faceColor.a;
|
||||
|
||||
fixed4 outlineColor = _OutlineColor;
|
||||
outlineColor.a *= opacity;
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
|
||||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
|
||||
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 layerOffset = float2(x, y);
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
|
||||
// Populate structure for pixel shader
|
||||
output.vertex = vPosition;
|
||||
output.faceColor = faceColor;
|
||||
output.outlineColor = outlineColor;
|
||||
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
|
||||
output.param = half4(scale, bias - outline, bias + outline, bias);
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
#endif
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
output.posLocal = vert.xyz;
|
||||
#endif
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
// PIXEL SHADER
|
||||
fixed4 PixShader(pixel_t input) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
|
||||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
|
||||
half4 c = input.faceColor * saturate(d - input.param.w);
|
||||
|
||||
#ifdef OUTLINE_ON
|
||||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
|
||||
c *= saturate(d - input.param.y);
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
half sd = saturate(d - input.param.z);
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
clip( RMUnityUIClipRect(input.posLocal.xy, _ClipRect, _ClipRectRadii) - 0.5);
|
||||
#endif
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
c *= input.texcoord1.z;
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(c.a - 0.001);
|
||||
#endif
|
||||
|
||||
return c;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
|
||||
}
|
||||
@@ -1,285 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace GeoSus.Client
|
||||
{
|
||||
// Klientská strana šifrování - generuje session key, šifruje RSA, AES-CBC session
|
||||
// Používá AES-CBC místo AES-GCM pro kompatibilitu s Unity
|
||||
public class ClientEncryption : IDisposable
|
||||
{
|
||||
private byte[] _sessionKey;
|
||||
private byte[] _sessionIv;
|
||||
private long _nonceCounter;
|
||||
private readonly object _lock = new object();
|
||||
|
||||
// Kontrola, zda je session key nastaven
|
||||
public bool HasSessionKey => _sessionKey != null && _sessionIv != null;
|
||||
|
||||
// Generuje nový session key a IV
|
||||
public void GenerateSessionKey()
|
||||
{
|
||||
_sessionKey = new byte[32]; // AES-256
|
||||
_sessionIv = new byte[16]; // CBC IV (16 bytes)
|
||||
|
||||
using (var rng = RandomNumberGenerator.Create())
|
||||
{
|
||||
rng.GetBytes(_sessionKey);
|
||||
rng.GetBytes(_sessionIv);
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] SessionKey => _sessionKey ?? throw new InvalidOperationException("Session key not generated");
|
||||
public byte[] SessionIV => _sessionIv ?? throw new InvalidOperationException("Session IV not generated");
|
||||
|
||||
// Zašifruje session key pomocí RSA public key serveru
|
||||
public (string EncryptedKey, string EncryptedIV) EncryptSessionKeyForServer(string rsaPublicKeyPem)
|
||||
{
|
||||
if (_sessionKey == null || _sessionIv == null)
|
||||
throw new InvalidOperationException("Session key not generated");
|
||||
|
||||
using (var rsa = RSA.Create())
|
||||
{
|
||||
// Parse PEM - extrahuj Base64 obsah
|
||||
var pemLines = rsaPublicKeyPem.Split('\n');
|
||||
var base64 = new StringBuilder();
|
||||
foreach (var line in pemLines)
|
||||
{
|
||||
var trimmed = line.Trim();
|
||||
if (!trimmed.StartsWith("-----") && !string.IsNullOrEmpty(trimmed))
|
||||
{
|
||||
base64.Append(trimmed);
|
||||
}
|
||||
}
|
||||
|
||||
var keyBytes = Convert.FromBase64String(base64.ToString());
|
||||
|
||||
// Unity kompatibilní import - parsujeme SubjectPublicKeyInfo ručně
|
||||
ImportSubjectPublicKeyInfoManual(rsa, keyBytes);
|
||||
|
||||
// Používáme OaepSHA1 pro Unity kompatibilitu (OaepSHA256 není podporován)
|
||||
var encryptedKey = rsa.Encrypt(_sessionKey, RSAEncryptionPadding.OaepSHA1);
|
||||
var encryptedIv = rsa.Encrypt(_sessionIv, RSAEncryptionPadding.OaepSHA1);
|
||||
|
||||
return (Convert.ToBase64String(encryptedKey), Convert.ToBase64String(encryptedIv));
|
||||
}
|
||||
}
|
||||
|
||||
// Ručně parsuje SubjectPublicKeyInfo (DER) a importuje RSA klíč - Unity kompatibilní
|
||||
private static void ImportSubjectPublicKeyInfoManual(RSA rsa, byte[] subjectPublicKeyInfo)
|
||||
{
|
||||
// SubjectPublicKeyInfo ::= SEQUENCE {
|
||||
// algorithm AlgorithmIdentifier,
|
||||
// subjectPublicKey BIT STRING }
|
||||
// RSAPublicKey ::= SEQUENCE { modulus INTEGER, publicExponent INTEGER }
|
||||
|
||||
int index = 0;
|
||||
|
||||
// Outer SEQUENCE
|
||||
if (subjectPublicKeyInfo[index++] != 0x30)
|
||||
throw new InvalidOperationException("Invalid SubjectPublicKeyInfo");
|
||||
ReadLength(subjectPublicKeyInfo, ref index);
|
||||
|
||||
// AlgorithmIdentifier SEQUENCE - skip it
|
||||
if (subjectPublicKeyInfo[index++] != 0x30)
|
||||
throw new InvalidOperationException("Invalid AlgorithmIdentifier");
|
||||
int algLen = ReadLength(subjectPublicKeyInfo, ref index);
|
||||
index += algLen;
|
||||
|
||||
// BIT STRING containing RSAPublicKey
|
||||
if (subjectPublicKeyInfo[index++] != 0x03)
|
||||
throw new InvalidOperationException("Invalid BIT STRING");
|
||||
ReadLength(subjectPublicKeyInfo, ref index);
|
||||
index++; // Skip unused bits byte (should be 0)
|
||||
|
||||
// RSAPublicKey SEQUENCE
|
||||
if (subjectPublicKeyInfo[index++] != 0x30)
|
||||
throw new InvalidOperationException("Invalid RSAPublicKey");
|
||||
ReadLength(subjectPublicKeyInfo, ref index);
|
||||
|
||||
// Modulus INTEGER
|
||||
byte[] modulus = ReadInteger(subjectPublicKeyInfo, ref index);
|
||||
|
||||
// Exponent INTEGER
|
||||
byte[] exponent = ReadInteger(subjectPublicKeyInfo, ref index);
|
||||
|
||||
var parameters = new RSAParameters
|
||||
{
|
||||
Modulus = modulus,
|
||||
Exponent = exponent
|
||||
};
|
||||
rsa.ImportParameters(parameters);
|
||||
}
|
||||
|
||||
private static int ReadLength(byte[] data, ref int index)
|
||||
{
|
||||
int length = data[index++];
|
||||
if ((length & 0x80) != 0)
|
||||
{
|
||||
int numBytes = length & 0x7F;
|
||||
length = 0;
|
||||
for (int i = 0; i < numBytes; i++)
|
||||
{
|
||||
length = (length << 8) | data[index++];
|
||||
}
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
private static byte[] ReadInteger(byte[] data, ref int index)
|
||||
{
|
||||
if (data[index++] != 0x02)
|
||||
throw new InvalidOperationException("Expected INTEGER");
|
||||
int length = ReadLength(data, ref index);
|
||||
|
||||
// Skip leading zero if present (used for positive sign in DER)
|
||||
int originalLength = length;
|
||||
int start = index;
|
||||
if (length > 1 && data[start] == 0x00)
|
||||
{
|
||||
start++;
|
||||
length--;
|
||||
}
|
||||
|
||||
byte[] result = new byte[length];
|
||||
Buffer.BlockCopy(data, start, result, 0, length);
|
||||
index += originalLength;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Šifruje zprávu pomocí AES-256-CBC s HMAC
|
||||
public byte[] Encrypt(byte[] plaintext)
|
||||
{
|
||||
if (_sessionKey == null || _sessionIv == null)
|
||||
throw new InvalidOperationException("Session key not set");
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
// Generuj unikátní IV pro tuto zprávu
|
||||
var iv = GetNextIV();
|
||||
|
||||
using (var aes = Aes.Create())
|
||||
{
|
||||
aes.Key = _sessionKey;
|
||||
aes.IV = iv;
|
||||
aes.Mode = CipherMode.CBC;
|
||||
aes.Padding = PaddingMode.PKCS7;
|
||||
|
||||
byte[] ciphertext;
|
||||
using (var encryptor = aes.CreateEncryptor())
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
using (var cs = new CryptoStream(ms, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
cs.Write(plaintext, 0, plaintext.Length);
|
||||
}
|
||||
ciphertext = ms.ToArray();
|
||||
}
|
||||
|
||||
// Compute HMAC pro integritu
|
||||
byte[] hmac;
|
||||
using (var hmacSha = new HMACSHA256(_sessionKey))
|
||||
{
|
||||
var toSign = new byte[iv.Length + ciphertext.Length];
|
||||
Buffer.BlockCopy(iv, 0, toSign, 0, iv.Length);
|
||||
Buffer.BlockCopy(ciphertext, 0, toSign, iv.Length, ciphertext.Length);
|
||||
hmac = hmacSha.ComputeHash(toSign);
|
||||
}
|
||||
|
||||
// Výstup: [16 bytes IV][32 bytes HMAC][ciphertext]
|
||||
var result = new byte[16 + 32 + ciphertext.Length];
|
||||
Buffer.BlockCopy(iv, 0, result, 0, 16);
|
||||
Buffer.BlockCopy(hmac, 0, result, 16, 32);
|
||||
Buffer.BlockCopy(ciphertext, 0, result, 48, ciphertext.Length);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dešifruje zprávu pomocí AES-256-CBC s HMAC ověřením
|
||||
public byte[] Decrypt(byte[] encrypted)
|
||||
{
|
||||
if (_sessionKey == null)
|
||||
throw new InvalidOperationException("Session key not set");
|
||||
|
||||
if (encrypted.Length < 48) return null;
|
||||
|
||||
try
|
||||
{
|
||||
var iv = new byte[16];
|
||||
var hmac = new byte[32];
|
||||
var ciphertext = new byte[encrypted.Length - 48];
|
||||
|
||||
Buffer.BlockCopy(encrypted, 0, iv, 0, 16);
|
||||
Buffer.BlockCopy(encrypted, 16, hmac, 0, 32);
|
||||
Buffer.BlockCopy(encrypted, 48, ciphertext, 0, ciphertext.Length);
|
||||
|
||||
// Ověř HMAC
|
||||
byte[] expectedHmac;
|
||||
using (var hmacSha = new HMACSHA256(_sessionKey))
|
||||
{
|
||||
var toVerify = new byte[iv.Length + ciphertext.Length];
|
||||
Buffer.BlockCopy(iv, 0, toVerify, 0, iv.Length);
|
||||
Buffer.BlockCopy(ciphertext, 0, toVerify, iv.Length, ciphertext.Length);
|
||||
expectedHmac = hmacSha.ComputeHash(toVerify);
|
||||
}
|
||||
|
||||
// Constant-time compare
|
||||
var diff = 0;
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
diff |= hmac[i] ^ expectedHmac[i];
|
||||
}
|
||||
if (diff != 0) return null; // HMAC mismatch
|
||||
|
||||
using (var aes = Aes.Create())
|
||||
{
|
||||
aes.Key = _sessionKey;
|
||||
aes.IV = iv;
|
||||
aes.Mode = CipherMode.CBC;
|
||||
aes.Padding = PaddingMode.PKCS7;
|
||||
|
||||
using (var decryptor = aes.CreateDecryptor())
|
||||
using (var ms = new MemoryStream(ciphertext))
|
||||
using (var cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Read))
|
||||
using (var output = new MemoryStream())
|
||||
{
|
||||
cs.CopyTo(output);
|
||||
return output.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] GetNextIV()
|
||||
{
|
||||
if (_sessionIv == null)
|
||||
throw new InvalidOperationException("Session IV not set");
|
||||
|
||||
var iv = new byte[16];
|
||||
Buffer.BlockCopy(_sessionIv, 0, iv, 0, 8);
|
||||
|
||||
var counter = System.Threading.Interlocked.Increment(ref _nonceCounter);
|
||||
var counterBytes = BitConverter.GetBytes(counter);
|
||||
Buffer.BlockCopy(counterBytes, 0, iv, 8, 8);
|
||||
|
||||
return iv;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_sessionKey != null)
|
||||
{
|
||||
Array.Clear(_sessionKey, 0, _sessionKey.Length);
|
||||
_sessionKey = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace GeoSus.Client
|
||||
{
|
||||
// Event dispatcher pro Unity main thread
|
||||
// Unity může přidat SynchronizationContext, nebo polling z Update()
|
||||
public class EventDispatcher
|
||||
{
|
||||
private readonly Queue<Action> _pendingActions = new Queue<Action>();
|
||||
private readonly object _lock = new object();
|
||||
private SynchronizationContext? _syncContext;
|
||||
|
||||
public EventDispatcher()
|
||||
{
|
||||
// Pokusíme se zachytit aktuální synchronization context (Unity main thread)
|
||||
_syncContext = SynchronizationContext.Current;
|
||||
}
|
||||
|
||||
// Volat z networking vlákna - naplánuje callback na main thread
|
||||
public void Post(Action action)
|
||||
{
|
||||
if (_syncContext != null)
|
||||
{
|
||||
_syncContext.Post(_ => action(), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback - přidáme do fronty pro polling
|
||||
lock (_lock)
|
||||
{
|
||||
_pendingActions.Enqueue(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Volat z Unity Update() pokud není SynchronizationContext
|
||||
public void ProcessPendingActions()
|
||||
{
|
||||
Action[] actions;
|
||||
lock (_lock)
|
||||
{
|
||||
if (_pendingActions.Count == 0) return;
|
||||
actions = _pendingActions.ToArray();
|
||||
_pendingActions.Clear();
|
||||
}
|
||||
|
||||
foreach (var action in actions)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"EventDispatcher error: {ex}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int PendingCount
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
return _pendingActions.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,607 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GeoSus.Client
|
||||
{
|
||||
// Hlavní klientská třída pro připojení k serveru
|
||||
public class GameClient : IDisposable
|
||||
{
|
||||
private TcpClient? _tcpClient;
|
||||
private NetworkStream? _stream;
|
||||
private ClientEncryption? _encryption;
|
||||
private CancellationTokenSource? _cts;
|
||||
private Task? _receiveTask;
|
||||
private int _clientSeq;
|
||||
private readonly object _sendLock = new object();
|
||||
private bool _handshakeComplete;
|
||||
|
||||
public string ClientUuid { get; }
|
||||
public string DisplayName { get; set; }
|
||||
public bool IsConnected => _tcpClient?.Connected ?? false;
|
||||
public bool IsReady => IsConnected && _handshakeComplete && (_encryption?.HasSessionKey ?? false);
|
||||
public EventDispatcher Dispatcher { get; }
|
||||
|
||||
// Events - voláno na main thread přes dispatcher
|
||||
public event Action? OnConnected;
|
||||
public event Action<string>? OnDisconnected;
|
||||
public event Action<string>? OnError;
|
||||
public event Action<Message>? OnMessage;
|
||||
public event Action<GameEvent>? OnGameEvent;
|
||||
|
||||
// Lobby state
|
||||
public string? LobbyId { get; private set; }
|
||||
public string? JoinCode { get; private set; }
|
||||
public LobbyState? CurrentLobbyState { get; private set; }
|
||||
public PlayerRole? MyRole { get; private set; }
|
||||
public List<GameTask> MyTasks { get; } = new List<GameTask>();
|
||||
public Position MyPosition { get; set; }
|
||||
public Dictionary<string, PlayerPositionInfo> PlayerPositions { get; } = new Dictionary<string, PlayerPositionInfo>();
|
||||
public List<Body> Bodies { get; } = new List<Body>();
|
||||
public int Ping { get; private set; }
|
||||
public long LastEventId { get; private set; }
|
||||
|
||||
/// <summary>Returns true if this client is the current lobby owner</summary>
|
||||
public bool IsOwner => CurrentLobbyState?.OwnerId == ClientUuid;
|
||||
|
||||
public GameClient(string clientUuid, string displayName)
|
||||
{
|
||||
ClientUuid = clientUuid;
|
||||
DisplayName = displayName;
|
||||
Dispatcher = new EventDispatcher();
|
||||
}
|
||||
|
||||
#region Connection
|
||||
|
||||
public async Task<bool> ConnectAsync(string host, int port)
|
||||
{
|
||||
try
|
||||
{
|
||||
_tcpClient = new TcpClient();
|
||||
await _tcpClient.ConnectAsync(host, port);
|
||||
_stream = _tcpClient.GetStream();
|
||||
_encryption = new ClientEncryption();
|
||||
_cts = new CancellationTokenSource();
|
||||
|
||||
// Handshake
|
||||
if (!await PerformHandshakeAsync())
|
||||
{
|
||||
Disconnect("Handshake failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Spustíme příjem zpráv
|
||||
_receiveTask = Task.Run(() => ReceiveLoopAsync(_cts.Token));
|
||||
|
||||
Dispatcher.Post(() => OnConnected?.Invoke());
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Dispatcher.Post(() => OnError?.Invoke(ex.Message));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool> PerformHandshakeAsync()
|
||||
{
|
||||
if (_stream == null || _encryption == null) return false;
|
||||
|
||||
// 1. ClientHello
|
||||
var hello = new ClientHello
|
||||
{
|
||||
ClientUuid = ClientUuid,
|
||||
DisplayName = DisplayName
|
||||
};
|
||||
await SendPlainAsync(hello);
|
||||
|
||||
// 2. ServerHello
|
||||
var serverHelloData = await ReadMessageAsync();
|
||||
if (serverHelloData == null) return false;
|
||||
|
||||
var serverHello = MessageSerializer.Deserialize(serverHelloData) as ServerHello;
|
||||
if (serverHello == null) return false;
|
||||
|
||||
// 3. Generujeme session key a šifrujeme RSA
|
||||
_encryption.GenerateSessionKey();
|
||||
var (encKey, encIv) = _encryption.EncryptSessionKeyForServer(serverHello.RsaPublicKeyPem);
|
||||
|
||||
var keyExchange = new KeyExchange
|
||||
{
|
||||
EncryptedSessionKey = encKey,
|
||||
EncryptedIV = encIv
|
||||
};
|
||||
await SendPlainAsync(keyExchange);
|
||||
|
||||
// 4. KeyExchangeAck (šifrovaně)
|
||||
var ackData = await ReadMessageAsync();
|
||||
if (ackData == null) return false;
|
||||
|
||||
var decrypted = _encryption.Decrypt(ackData);
|
||||
if (decrypted == null) return false;
|
||||
|
||||
var ack = MessageSerializer.Deserialize(decrypted) as KeyExchangeAck;
|
||||
if (ack?.Status == "success")
|
||||
{
|
||||
_handshakeComplete = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Disconnect(string reason = "User disconnected")
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_tcpClient?.Close();
|
||||
_tcpClient = null;
|
||||
_stream = null;
|
||||
_encryption?.Dispose();
|
||||
_encryption = null;
|
||||
|
||||
LobbyId = null;
|
||||
JoinCode = null;
|
||||
CurrentLobbyState = null;
|
||||
MyRole = null;
|
||||
MyTasks.Clear();
|
||||
PlayerPositions.Clear();
|
||||
Bodies.Clear();
|
||||
|
||||
Dispatcher.Post(() => OnDisconnected?.Invoke(reason));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sending
|
||||
|
||||
public void Send(Message message)
|
||||
{
|
||||
if (_stream == null || _encryption == null || !IsConnected) return;
|
||||
|
||||
message.ClientSeq = Interlocked.Increment(ref _clientSeq);
|
||||
if (string.IsNullOrEmpty(message.ActionId))
|
||||
{
|
||||
message.ActionId = Guid.NewGuid().ToString("N").Substring(0, 8);
|
||||
}
|
||||
|
||||
var plain = MessageSerializer.Serialize(message);
|
||||
var encrypted = _encryption.Encrypt(plain);
|
||||
|
||||
lock (_sendLock)
|
||||
{
|
||||
try
|
||||
{
|
||||
SendData(encrypted);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Dispatcher.Post(() => OnError?.Invoke($"Send error: {ex.Message}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SendPlainAsync(Message message)
|
||||
{
|
||||
if (_stream == null) return;
|
||||
var data = MessageSerializer.Serialize(message);
|
||||
await SendDataAsync(data);
|
||||
}
|
||||
|
||||
private void SendData(byte[] data)
|
||||
{
|
||||
if (_stream == null) return;
|
||||
|
||||
var lengthBuffer = BitConverter.GetBytes(data.Length);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(lengthBuffer);
|
||||
|
||||
_stream.Write(lengthBuffer, 0, 4);
|
||||
_stream.Write(data, 0, data.Length);
|
||||
_stream.Flush();
|
||||
}
|
||||
|
||||
private async Task SendDataAsync(byte[] data)
|
||||
{
|
||||
if (_stream == null) return;
|
||||
|
||||
var lengthBuffer = BitConverter.GetBytes(data.Length);
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(lengthBuffer);
|
||||
|
||||
await _stream.WriteAsync(lengthBuffer, 0, 4);
|
||||
await _stream.WriteAsync(data, 0, data.Length);
|
||||
await _stream.FlushAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Receiving
|
||||
|
||||
private async Task ReceiveLoopAsync(CancellationToken ct)
|
||||
{
|
||||
int decryptFailures = 0;
|
||||
|
||||
try
|
||||
{
|
||||
while (!ct.IsCancellationRequested && IsConnected)
|
||||
{
|
||||
var data = await ReadMessageAsync();
|
||||
if (data == null) break;
|
||||
|
||||
var decrypted = _encryption?.Decrypt(data);
|
||||
if (decrypted == null)
|
||||
{
|
||||
decryptFailures++;
|
||||
if (decryptFailures >= 3)
|
||||
{
|
||||
Disconnect("Too many decryption failures");
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
decryptFailures = 0;
|
||||
|
||||
var message = MessageSerializer.Deserialize(decrypted);
|
||||
if (message != null)
|
||||
{
|
||||
ProcessMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!ct.IsCancellationRequested)
|
||||
{
|
||||
Disconnect($"Connection error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<byte[]?> ReadMessageAsync()
|
||||
{
|
||||
if (_stream == null) return null;
|
||||
|
||||
var lengthBuffer = new byte[4];
|
||||
var read = await _stream.ReadAsync(lengthBuffer, 0, 4);
|
||||
if (read < 4) return null;
|
||||
|
||||
if (BitConverter.IsLittleEndian)
|
||||
Array.Reverse(lengthBuffer);
|
||||
var length = BitConverter.ToInt32(lengthBuffer, 0);
|
||||
|
||||
if (length <= 0 || length > 1048576) return null;
|
||||
|
||||
var buffer = new byte[length];
|
||||
var totalRead = 0;
|
||||
while (totalRead < length)
|
||||
{
|
||||
read = await _stream.ReadAsync(buffer, totalRead, length - totalRead);
|
||||
if (read == 0) return null;
|
||||
totalRead += read;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private void ProcessMessage(Message message)
|
||||
{
|
||||
// Zpracujeme speciální typy
|
||||
switch (message)
|
||||
{
|
||||
case CreateLobbyResponse r:
|
||||
if (r.Success)
|
||||
{
|
||||
LobbyId = r.LobbyId;
|
||||
JoinCode = r.JoinCode;
|
||||
CurrentLobbyState = r.LobbyState;
|
||||
}
|
||||
break;
|
||||
|
||||
case JoinLobbyResponse r:
|
||||
if (r.Success)
|
||||
{
|
||||
LobbyId = r.LobbyId;
|
||||
CurrentLobbyState = r.LobbyState;
|
||||
JoinCode = r.LobbyState?.JoinCode;
|
||||
}
|
||||
break;
|
||||
|
||||
case PositionBroadcast b:
|
||||
ProcessPositionBroadcast(b);
|
||||
break;
|
||||
|
||||
case Pong p:
|
||||
var now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||
Ping = (int)(now - p.ClientTime);
|
||||
break;
|
||||
|
||||
case GameEvent evt:
|
||||
ProcessGameEvent(evt);
|
||||
Dispatcher.Post(() => OnGameEvent?.Invoke(evt));
|
||||
break;
|
||||
}
|
||||
|
||||
Dispatcher.Post(() => OnMessage?.Invoke(message));
|
||||
}
|
||||
|
||||
private void ProcessPositionBroadcast(PositionBroadcast broadcast)
|
||||
{
|
||||
PlayerPositions.Clear();
|
||||
foreach (var player in broadcast.Players)
|
||||
{
|
||||
PlayerPositions[player.ClientUuid] = player;
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessGameEvent(GameEvent evt)
|
||||
{
|
||||
LastEventId = evt.EventId;
|
||||
|
||||
switch (evt.EventType)
|
||||
{
|
||||
case "PlayerJoined":
|
||||
// Add player to lobby state
|
||||
var joinedPayload = evt.GetPayload<PlayerJoinedPayload>();
|
||||
if (joinedPayload != null && CurrentLobbyState?.Players != null)
|
||||
{
|
||||
// Check if player already exists
|
||||
bool exists = CurrentLobbyState.Players.Any(p => p.ClientUuid == joinedPayload.ClientUuid);
|
||||
if (!exists)
|
||||
{
|
||||
CurrentLobbyState.Players.Add(new PlayerInfo
|
||||
{
|
||||
ClientUuid = joinedPayload.ClientUuid,
|
||||
DisplayName = joinedPayload.DisplayName,
|
||||
IsOwner = false,
|
||||
IsReady = false,
|
||||
State = PlayerState.Alive
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "PlayerLeft":
|
||||
// Remove player from lobby state
|
||||
var leftPayload = evt.GetPayload<PlayerLeftPayload>();
|
||||
if (leftPayload != null && CurrentLobbyState?.Players != null)
|
||||
{
|
||||
CurrentLobbyState.Players.RemoveAll(p => p.ClientUuid == leftPayload.ClientUuid);
|
||||
}
|
||||
break;
|
||||
|
||||
case "HostChanged":
|
||||
// Update lobby owner
|
||||
var hostPayload = evt.GetPayload<HostChangedPayload>();
|
||||
if (hostPayload != null && CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.OwnerId = hostPayload.NewHostId;
|
||||
// Update IsOwner flag on all players
|
||||
foreach (var player in CurrentLobbyState.Players)
|
||||
{
|
||||
player.IsOwner = player.ClientUuid == hostPayload.NewHostId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "GameStarting":
|
||||
// Game is entering loading phase - update lobby state if available
|
||||
if (CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.Phase = GamePhase.Loading;
|
||||
}
|
||||
break;
|
||||
|
||||
case "MapDataReady":
|
||||
// Map data received - store it and send confirmation
|
||||
var mapDataPayload = evt.GetPayload<MapDataReadyPayload>();
|
||||
if (mapDataPayload != null && CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.MapData = mapDataPayload.MapData;
|
||||
CurrentLobbyState.MapDataReady = true;
|
||||
}
|
||||
// Send confirmation to server
|
||||
Send(new MapDataReceived());
|
||||
break;
|
||||
|
||||
case "GameStarted":
|
||||
// Game officially started - update phase
|
||||
if (CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.Phase = GamePhase.Playing;
|
||||
}
|
||||
break;
|
||||
|
||||
case "RoleAssigned":
|
||||
var rolePayload = evt.GetPayload<RoleAssignedPayload>();
|
||||
if (rolePayload != null && rolePayload.ClientUuid == ClientUuid)
|
||||
{
|
||||
MyRole = rolePayload.Role;
|
||||
MyTasks.Clear();
|
||||
if (rolePayload.Tasks != null)
|
||||
{
|
||||
MyTasks.AddRange(rolePayload.Tasks);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "PlayerKilled":
|
||||
var killPayload = evt.GetPayload<PlayerKilledPayload>();
|
||||
if (killPayload != null)
|
||||
{
|
||||
Bodies.Add(new Body
|
||||
{
|
||||
BodyId = killPayload.BodyId,
|
||||
VictimId = killPayload.VictimId,
|
||||
Location = killPayload.Location
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case "MeetingStarted":
|
||||
if (CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.Phase = GamePhase.Meeting;
|
||||
}
|
||||
break;
|
||||
|
||||
case "VotingClosed":
|
||||
Bodies.Clear(); // Bodies zmizí po meetingu
|
||||
if (CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.Phase = GamePhase.Playing;
|
||||
}
|
||||
break;
|
||||
|
||||
case "GameEnded":
|
||||
if (CurrentLobbyState != null)
|
||||
{
|
||||
CurrentLobbyState.Phase = GamePhase.Ended;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Game Actions
|
||||
|
||||
public void CreateLobby(Position? center = null, int impostorCount = 1, int taskCount = 5, string? password = null, double playAreaRadius = 500)
|
||||
{
|
||||
Send(new CreateLobby
|
||||
{
|
||||
PlayAreaCenter = center,
|
||||
PlayAreaRadius = playAreaRadius,
|
||||
ImpostorCount = impostorCount,
|
||||
TaskCount = taskCount,
|
||||
Password = password
|
||||
});
|
||||
}
|
||||
|
||||
public void JoinLobby(string joinCode, string? password = null)
|
||||
{
|
||||
Send(new JoinLobby
|
||||
{
|
||||
JoinCode = joinCode.ToUpperInvariant(),
|
||||
Password = password
|
||||
});
|
||||
}
|
||||
|
||||
public void LeaveLobby()
|
||||
{
|
||||
Send(new LeaveLobby());
|
||||
LobbyId = null;
|
||||
JoinCode = null;
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
Send(new StartGame());
|
||||
}
|
||||
|
||||
public void ReturnToLobby()
|
||||
{
|
||||
Send(new ReturnToLobby());
|
||||
}
|
||||
|
||||
public void UpdatePosition(Position position)
|
||||
{
|
||||
MyPosition = position;
|
||||
Send(new UpdatePosition { Position = position });
|
||||
}
|
||||
|
||||
public void Kill(string targetUuid)
|
||||
{
|
||||
Send(new KillAttempt { TargetClientUuid = targetUuid });
|
||||
}
|
||||
|
||||
public void ReportBody(string bodyId)
|
||||
{
|
||||
Send(new ReportBody { BodyId = bodyId });
|
||||
}
|
||||
|
||||
public void CallEmergencyMeeting()
|
||||
{
|
||||
Send(new CallEmergencyMeeting());
|
||||
}
|
||||
|
||||
public void Vote(string? targetUuid)
|
||||
{
|
||||
Send(new CastVote { TargetClientUuid = targetUuid });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pokus o dokončení tasku. Server ověří že hráč je na správné pozici.
|
||||
/// </summary>
|
||||
public void CompleteTask(string taskId)
|
||||
{
|
||||
Send(new TaskComplete { TaskId = taskId });
|
||||
}
|
||||
|
||||
public void SendPing()
|
||||
{
|
||||
Send(new Ping { ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() });
|
||||
}
|
||||
|
||||
public void Reconnect(string lobbyId)
|
||||
{
|
||||
Send(new Reconnect { LobbyId = lobbyId, LastEventId = LastEventId });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
public Body? FindNearbyBody(double maxDistance)
|
||||
{
|
||||
foreach (var body in Bodies)
|
||||
{
|
||||
if (MyPosition.DistanceTo(body.Location) <= maxDistance)
|
||||
{
|
||||
return body;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public string? FindNearbyPlayer(double maxDistance, bool aliveOnly = true)
|
||||
{
|
||||
foreach (var (uuid, info) in PlayerPositions)
|
||||
{
|
||||
if (uuid == ClientUuid) continue;
|
||||
if (aliveOnly && info.State != PlayerState.Alive) continue;
|
||||
|
||||
if (MyPosition.DistanceTo(info.Position) <= maxDistance)
|
||||
{
|
||||
return uuid;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public GameTask? FindNearbyTask(double maxDistance)
|
||||
{
|
||||
foreach (var task in MyTasks)
|
||||
{
|
||||
if (MyPosition.DistanceTo(task.Location) <= maxDistance)
|
||||
{
|
||||
return task;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Volat z Unity Update() pro zpracování callbacků
|
||||
public void Update()
|
||||
{
|
||||
Dispatcher.ProcessPendingActions();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Disconnect("Disposed");
|
||||
_encryption?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
Assets/Dancing triangle 1 Hour [YB3yHfqdw3Y].mp3
Normal file
BIN
Assets/Dancing triangle 1 Hour [YB3yHfqdw3Y].mp3
Normal file
Binary file not shown.
23
Assets/Dancing triangle 1 Hour [YB3yHfqdw3Y].mp3.meta
Normal file
23
Assets/Dancing triangle 1 Hour [YB3yHfqdw3Y].mp3.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58ebc3ffa125a9949953f6704e0a8c39
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/GameManager.meta
Normal file
8
Assets/GameManager.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74c99196e7d046a4497d6aa5ba358650
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,91 +0,0 @@
|
||||
using UnityEngine;
|
||||
using GeoSus.Client;
|
||||
using Subsystems;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
/*
|
||||
GameManager - hlavní tøida pro správu hry
|
||||
GameManager_Network - subsystém pro správu komunikace se serverem
|
||||
GameManager_Game - subsystém pro správu logiky hry (sabotáže, tasky, atd.)
|
||||
GameManager_Map - subsystém pro správu mapy a prostøedí
|
||||
GameManager_Input - subsystém pro správu vstupu od hráèe
|
||||
GameManager_UI - subsystém pro správu uživatelského rozhraní
|
||||
GamaManager_Stats - subsystém pro správu statistik pro server
|
||||
*/
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
[Header("Subsystems")]
|
||||
protected GameManager_Network networkSubsystem;
|
||||
protected GameManager_UI uiSubsystem;
|
||||
|
||||
|
||||
protected GameClient gameClient;
|
||||
[Header("Player Info")]
|
||||
public string displayName;
|
||||
|
||||
[Header("UI Elements")]
|
||||
public Canvas JoinCreateLobby;
|
||||
public Canvas InLobby;
|
||||
|
||||
void Start()
|
||||
{
|
||||
DontDestroyOnLoad(this);
|
||||
if (displayName == null || displayName == "")
|
||||
{
|
||||
displayName = "Player_" + Random.Range(1000, 9999).ToString();
|
||||
}
|
||||
gameClient = new GameClient(GenerateUUID(), /*displayName*/ GenerateUsername());
|
||||
uiSubsystem = new GameManager_UI(gameClient, JoinCreateLobby, InLobby);
|
||||
networkSubsystem = new GameManager_Network(gameClient);
|
||||
networkSubsystem.OpenConection();
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (gameClient.CurrentLobbyState != null)
|
||||
{
|
||||
uiSubsystem.UpdateLobbyUI();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected string GenerateUUID()
|
||||
{
|
||||
string UUID = System.Guid.NewGuid().ToString();
|
||||
Debug.Log(UUID);
|
||||
return UUID;
|
||||
}
|
||||
protected string GenerateUsername()
|
||||
{
|
||||
string Username = Random.Range(0,10).ToString() + Random.Range(0, 10).ToString() + Random.Range(0, 10).ToString() + Random.Range(0, 10).ToString();
|
||||
Debug.Log(Username);
|
||||
return Username;
|
||||
}
|
||||
public void CreateLobbyButton()
|
||||
{
|
||||
networkSubsystem.CrateLobby(50.0755, 14.4378);
|
||||
}
|
||||
public void JoinLobbyButton()
|
||||
{
|
||||
TMP_InputField joinCode = JoinCreateLobby.transform.Find("InputCode").GetComponent<TMP_InputField>();
|
||||
if (joinCode.text != null && joinCode.text != "")
|
||||
{
|
||||
networkSubsystem.JoinLobby(joinCode.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Join code is empty!");
|
||||
}
|
||||
}
|
||||
public void LeaveLobbyButton()
|
||||
{
|
||||
networkSubsystem.LeaveLobby();
|
||||
}
|
||||
void OnApplicationQuit()
|
||||
{
|
||||
gameClient.Disconnect();
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
using GeoSus.Client;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Subsystems
|
||||
{
|
||||
public class GameManager_Network
|
||||
{
|
||||
private const string _serverAddress = "geosus.honzuvkod.dev";
|
||||
private const int _serverPort = 7777;
|
||||
private GameClient _gameClient;
|
||||
public async void OpenConection()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Task<bool> state = _gameClient.ConnectAsync(_serverAddress, _serverPort);
|
||||
await state;
|
||||
if (state.Result)
|
||||
{
|
||||
Debug.Log("Connected to server.");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Failed to connect to server");
|
||||
}
|
||||
await Task.Delay(5000);
|
||||
}
|
||||
}
|
||||
public GameManager_Network(GameClient gameClient)
|
||||
{
|
||||
_gameClient = gameClient;
|
||||
RegisterEventHandlers();
|
||||
}
|
||||
public void RegisterEventHandlers()
|
||||
{
|
||||
_gameClient.OnConnected += OnConnected;
|
||||
_gameClient.OnDisconnected += OnDisconnected;
|
||||
_gameClient.OnError += OnError;
|
||||
_gameClient.OnMessage += OnMessage;
|
||||
_gameClient.OnGameEvent += OnGameEvent;
|
||||
}
|
||||
private void OnConnected()
|
||||
{
|
||||
Debug.Log("Successfully connected to the server.");
|
||||
}
|
||||
private void OnDisconnected(string reason)
|
||||
{
|
||||
Debug.Log($"Host disconnected due to {reason}");
|
||||
}
|
||||
private void OnError(string error)
|
||||
{
|
||||
Debug.LogError($"Network error: {error}");
|
||||
}
|
||||
private void OnMessage(Message message)
|
||||
{
|
||||
switch (message.Type)
|
||||
{
|
||||
case "GameEvent":
|
||||
OnGameEvent(message as GameEvent);
|
||||
break;
|
||||
case "CreateLobbyResponse":
|
||||
Debug.Log("Received CreateLobbyResponse message");
|
||||
HandleCreateLobbyResponse(message as CreateLobbyResponse);
|
||||
break;
|
||||
case "JoinLobbyResponse":
|
||||
Debug.Log("Received JoinLobbyResponse message");
|
||||
HandleJoinLobbyResponse(message as JoinLobbyResponse);
|
||||
break;
|
||||
case "Ack":
|
||||
Debug.Log("Received Ack message");
|
||||
break;
|
||||
default:
|
||||
Debug.Log("Received message of type: " + message.Type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void OnGameEvent(GameEvent gameEvent)
|
||||
{
|
||||
switch (gameEvent.Type)
|
||||
{
|
||||
case "PlayerJoined":
|
||||
Debug.Log($"Player {gameEvent.GetPayload<PlayerJoinedPayload>().DisplayName} joined");
|
||||
HandlePlayerJoined(gameEvent);
|
||||
break;
|
||||
default:
|
||||
Debug.Log("Received GameEvent of type: " + gameEvent.Type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void HandleCreateLobbyResponse(CreateLobbyResponse message)
|
||||
{
|
||||
if (message.Success)
|
||||
{
|
||||
Debug.Log("Lobby created successfully. Join Code: " + message.JoinCode + ", Lobby ID: " + message.LobbyId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Failed to create lobby: " + message.Error);
|
||||
}
|
||||
}
|
||||
private void HandleJoinLobbyResponse(JoinLobbyResponse message)
|
||||
{
|
||||
if (message.Success)
|
||||
{
|
||||
Debug.Log("Lobby created successfully." + ", Lobby ID: " + message.LobbyId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Failed to create lobby: " + message.Error);
|
||||
}
|
||||
}
|
||||
private void HandlePlayerJoined(GameEvent gameEvent)
|
||||
{
|
||||
var payload = gameEvent.GetPayload<PlayerJoinedPayload>();
|
||||
_gameClient.CurrentLobbyState.Players.Add(new PlayerInfo
|
||||
{
|
||||
ClientUuid = payload.ClientUuid,
|
||||
DisplayName = payload.DisplayName,
|
||||
IsOwner = false,
|
||||
IsReady = false,
|
||||
State = PlayerState.Alive
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void CrateLobby(double lat, double lon)
|
||||
{
|
||||
_gameClient.CreateLobby(new Position(lat, lon));
|
||||
}
|
||||
public void JoinLobby(string joinCode)
|
||||
{
|
||||
try
|
||||
{
|
||||
_gameClient.JoinLobby(joinCode);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Debug.LogError("Error joining lobby: " + ex.Message);
|
||||
}
|
||||
}
|
||||
public void LeaveLobby()
|
||||
{
|
||||
_gameClient.Disconnect();
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
using UnityEngine;
|
||||
using Subsystems;
|
||||
using GeoSus.Client;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Subsystems
|
||||
{
|
||||
public class GameManager_UI
|
||||
{
|
||||
private GameClient _gameClient;
|
||||
private Canvas _CreateJoinLobby;
|
||||
private Canvas _InLobby;
|
||||
public GameManager_UI(GameClient gameClient, Canvas CreateJoinLobby, Canvas InLobby)
|
||||
{
|
||||
_gameClient = gameClient;
|
||||
_CreateJoinLobby = CreateJoinLobby;
|
||||
_InLobby = InLobby;
|
||||
_CreateJoinLobby.enabled = true;
|
||||
_InLobby.enabled = false;
|
||||
}
|
||||
public void UpdateLobbyUI()
|
||||
{
|
||||
_InLobby.enabled = true;
|
||||
_CreateJoinLobby.enabled = false;
|
||||
var playerList = _InLobby.transform.Find("PlayerList").GetComponent<TMPro.TMP_Text>();
|
||||
playerList.text = "";
|
||||
foreach (var player in _gameClient.CurrentLobbyState.Players)
|
||||
{
|
||||
playerList.text += player.DisplayName + "\n";
|
||||
}
|
||||
_InLobby.transform.Find("JoinCode").GetComponent<TMPro.TMP_Text>().text = _gameClient.CurrentLobbyState.JoinCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using GeoSus.Client;
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
2
Assets/GameManager/ITask.cs.meta
Normal file
2
Assets/GameManager/ITask.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 743fed9d96a90254c88556de9fee92b0
|
||||
7
Assets/InputSystem_Actions.inputactions.meta
Normal file
7
Assets/InputSystem_Actions.inputactions.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfd97d0fee743f945a3d47b571fe9f20
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Materials.meta
Normal file
8
Assets/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f6ce7f674a77664ead5dbb89193e587
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/Readme.asset
Normal file
34
Assets/Readme.asset
Normal file
@@ -0,0 +1,34 @@
|
||||
%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: 11500000, guid: fcf7219bab7fe46a1ad266029b2fee19, type: 3}
|
||||
m_Name: Readme
|
||||
m_EditorClassIdentifier:
|
||||
icon: {fileID: 2800000, guid: 727a75301c3d24613a3ebcec4a24c2c8, type: 3}
|
||||
title: URP Empty Template
|
||||
sections:
|
||||
- heading: Welcome to the Universal Render Pipeline
|
||||
text: This template includes the settings and assets you need to start creating with the Universal Render Pipeline.
|
||||
linkText:
|
||||
url:
|
||||
- heading: URP Documentation
|
||||
text:
|
||||
linkText: Read more about URP
|
||||
url: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest
|
||||
- heading: Forums
|
||||
text:
|
||||
linkText: Get answers and support
|
||||
url: https://forum.unity.com/forums/universal-render-pipeline.383/
|
||||
- heading: Report bugs
|
||||
text:
|
||||
linkText: Submit a report
|
||||
url: https://unity3d.com/unity/qa/bug-reporting
|
||||
loadedLayout: 1
|
||||
8
Assets/Readme.asset.meta
Normal file
8
Assets/Readme.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: befd731805f7270498a643333899b479
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scenes.meta
Normal file
8
Assets/Scenes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe6cecdde8bb6e1489d0b7e5b793ce84
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/SampleScene.unity.meta
Normal file
7
Assets/Scenes/SampleScene.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a18d9b328b6a794da5d050347950362
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,548 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &564375757
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 564375760}
|
||||
- component: {fileID: 564375759}
|
||||
- component: {fileID: 564375758}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &564375758
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564375757}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &564375759
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564375757}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &564375760
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564375757}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1274200469
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1274200471}
|
||||
- component: {fileID: 1274200473}
|
||||
- component: {fileID: 1274200472}
|
||||
- component: {fileID: 1274200474}
|
||||
m_Layer: 0
|
||||
m_Name: APIManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1274200471
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1274200469}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &1274200472
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1274200469}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 283cf727b4c3ac64c94d59598e221b10, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &1274200473
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1274200469}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!114 &1274200474
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1274200469}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a58b19ca2646e434ea88b8112260362b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MapRenderer
|
||||
queryRadiusMeters: 1000
|
||||
gpsManager: {fileID: 1539417978}
|
||||
buildingMaterial: {fileID: 2100000, guid: 283cf727b4c3ac64c94d59598e221b10, type: 2}
|
||||
defaultFloorHeight: 3
|
||||
defaultBuildingHeight: 6
|
||||
roadMaterial: {fileID: 2100000, guid: 283cf727b4c3ac64c94d59598e221b10, type: 2}
|
||||
defaultRoadWidth: 4
|
||||
motorwayWidth: 10
|
||||
primaryWidth: 8
|
||||
secondaryWidth: 6
|
||||
tertiaryWidth: 5
|
||||
metersPerUnit: 1
|
||||
--- !u!1 &1539417977
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1539417979}
|
||||
- component: {fileID: 1539417978}
|
||||
m_Layer: 0
|
||||
m_Name: currentGPS
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1539417978
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1539417977}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b892bed07e5c4d45ad23b4a9b108e08, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::GPSManager
|
||||
Accuracy: 10
|
||||
UpdateDistance: 5
|
||||
MaxWait: 20
|
||||
--- !u!4 &1539417979
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1539417977}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -18.75082, y: 0, z: 46.79584}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1865882987
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1865882990}
|
||||
- component: {fileID: 1865882989}
|
||||
- component: {fileID: 1865882988}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1865882988
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1865882987}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.EventSystems.StandaloneInputModule
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1865882989
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1865882987}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.EventSystems.EventSystem
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1865882990
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1865882987}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1896274046
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1896274048}
|
||||
- component: {fileID: 1896274047}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1896274047
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1896274046}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 11
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ForceVisible: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
m_LightUnit: 1
|
||||
m_LuxAtDistance: 1
|
||||
m_EnableSpotReflector: 1
|
||||
--- !u!4 &1896274048
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1896274046}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 564375760}
|
||||
- {fileID: 1896274048}
|
||||
- {fileID: 1865882990}
|
||||
- {fileID: 1274200471}
|
||||
- {fileID: 1539417979}
|
||||
8
Assets/Scripts.meta
Normal file
8
Assets/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8ce5b30e6200134bae071db3ae43149
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/Scripts/FollowPositionOnly.cs
Normal file
27
Assets/Scripts/FollowPositionOnly.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class FollowParentPositionOnly : MonoBehaviour
|
||||
{
|
||||
public Transform parent;
|
||||
private Quaternion initialRotation;
|
||||
private Vector3 worldOffset;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (parent == null)
|
||||
parent = transform.parent;
|
||||
|
||||
// Store offset in WORLD space
|
||||
worldOffset = transform.position - parent.position;
|
||||
initialRotation = transform.rotation;
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (parent == null) return;
|
||||
|
||||
// Move child using stored world offset
|
||||
transform.position = parent.position + worldOffset;
|
||||
transform.rotation = initialRotation;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/FollowPositionOnly.cs.meta
Normal file
2
Assets/Scripts/FollowPositionOnly.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b159266533f64ba4eb30ef6112cc4611
|
||||
@@ -1,68 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class GPSManager : MonoBehaviour
|
||||
{
|
||||
[Header("GPS settings")]
|
||||
public float Accuracy = 10f;
|
||||
public float UpdateDistance = 5f;
|
||||
public int MaxWait = 20;
|
||||
|
||||
[Header("GPS coordinates")]
|
||||
private double[] LastCoords = new double[2];
|
||||
private double[] FailsafeCoords = new double[] { 50.7727878, 15.0718625 };
|
||||
private double? LastTime;
|
||||
|
||||
void Start()
|
||||
{
|
||||
StartCoroutine(UpdateGPS());
|
||||
}
|
||||
|
||||
public double[] GetLastCoords()
|
||||
{
|
||||
if (LastCoords[0] == 0 && LastCoords[1] == 0) { return FailsafeCoords; }
|
||||
return LastCoords;
|
||||
}
|
||||
IEnumerator UpdateGPS()
|
||||
{
|
||||
if (!Input.location.isEnabledByUser)
|
||||
{
|
||||
Debug.Log("GPS not enabled by user");
|
||||
LastCoords = FailsafeCoords;
|
||||
LastTime = null;
|
||||
yield break;
|
||||
}
|
||||
|
||||
Input.location.Start(Accuracy, UpdateDistance);
|
||||
|
||||
while (Input.location.status == LocationServiceStatus.Initializing && MaxWait > 0)
|
||||
{
|
||||
yield return new WaitForSeconds(1);
|
||||
MaxWait--;
|
||||
}
|
||||
|
||||
if (MaxWait < 1)
|
||||
{
|
||||
Debug.Log("GPS timed out");
|
||||
LastCoords = FailsafeCoords;
|
||||
LastTime = null;
|
||||
yield break;
|
||||
}
|
||||
if (Input.location.status == LocationServiceStatus.Failed)
|
||||
{
|
||||
Debug.Log("GPS failed to determine device location");
|
||||
LastCoords = FailsafeCoords;
|
||||
LastTime = null;
|
||||
yield break;
|
||||
}
|
||||
else
|
||||
{
|
||||
LastCoords[0] = Input.location.lastData.latitude;
|
||||
LastCoords[1] = Input.location.lastData.longitude;
|
||||
LastTime = Input.location.lastData.timestamp;
|
||||
|
||||
Debug.Log("GPS location: " + LastCoords[0] + ", " + LastCoords[1] + " (time: " + LastTime + ")");
|
||||
}
|
||||
yield return StartCoroutine(UpdateGPS());
|
||||
}
|
||||
}
|
||||
30
Assets/Scripts/GyroPlatformController.cs
Normal file
30
Assets/Scripts/GyroPlatformController.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GyroPlatformController : MonoBehaviour
|
||||
{
|
||||
public Rigidbody ball;
|
||||
public float forceStrength = 30f;
|
||||
public float dampingPerSecond = 0.9f;
|
||||
void Start()
|
||||
{
|
||||
if (SystemInfo.supportsGyroscope)
|
||||
{
|
||||
Input.gyro.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
if (ball == null) return;
|
||||
|
||||
Vector3 g = Input.gyro.gravity;
|
||||
|
||||
Vector3 force = new Vector3(g.x, 0f, g.y);
|
||||
|
||||
ball.AddForce(force * forceStrength, ForceMode.Acceleration);
|
||||
|
||||
float frameDamping = Mathf.Pow(dampingPerSecond, Time.deltaTime);
|
||||
|
||||
ball.linearVelocity *= frameDamping;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/GyroPlatformController.cs.meta
Normal file
2
Assets/Scripts/GyroPlatformController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d665da208a5a3ad408e85341263c60e5
|
||||
33
Assets/Scripts/HoleGoalTrigger.cs
Normal file
33
Assets/Scripts/HoleGoalTrigger.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HoleGoalTrigger : MonoBehaviour
|
||||
{
|
||||
[Tooltip("Optional: assign the ball rigidbody or leave empty to accept any Rigidbody with tag Ball.")]
|
||||
public Rigidbody ballRigidbody;
|
||||
|
||||
[Tooltip("If true, checks tag 'Ball' when ballRigidbody not assigned.")]
|
||||
public bool requireBallTag = true;
|
||||
|
||||
public System.Action OnBallScored;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (ballRigidbody != null)
|
||||
{
|
||||
if (other.attachedRigidbody == ballRigidbody)
|
||||
{
|
||||
OnBallScored?.Invoke();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (other.attachedRigidbody == null) return;
|
||||
|
||||
if (requireBallTag)
|
||||
{
|
||||
if (!other.CompareTag("Ball")) return;
|
||||
}
|
||||
|
||||
OnBallScored?.Invoke();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/HoleGoalTrigger.cs.meta
Normal file
2
Assets/Scripts/HoleGoalTrigger.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6bad0eb7441229448191433d8a9f758
|
||||
@@ -1,8 +0,0 @@
|
||||
using UnityEngine;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public interface IMapDataCollector
|
||||
{
|
||||
public Task<string> CallOverpassApi(FormUrlEncodedContent query);
|
||||
}
|
||||
@@ -1,500 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
|
||||
public class MapRenderer : MonoBehaviour
|
||||
{
|
||||
[Header("Overpass settings")]
|
||||
public const string overpassUrl = "https://mapz.honzuvkod.dev/api/interpreter";
|
||||
public float queryRadiusMeters = 200f; // radius around lat/lon to query
|
||||
|
||||
[Header("Location (lat, lon)")]
|
||||
public GPSManager gpsManager;
|
||||
private double latitude = 50.7727878;
|
||||
private double longitude = 15.0718625;
|
||||
|
||||
[Header("Building settings")]
|
||||
public Material buildingMaterial;
|
||||
public float defaultFloorHeight = 3.0f; // meters per level
|
||||
public float defaultBuildingHeight = 6.0f; // if no tags
|
||||
|
||||
[Header("Road settings")]
|
||||
public Material roadMaterial;
|
||||
public float defaultRoadWidth = 4.0f; // meters
|
||||
public float motorwayWidth = 10.0f;
|
||||
public float primaryWidth = 8.0f;
|
||||
public float secondaryWidth = 6.0f;
|
||||
public float tertiaryWidth = 5.0f;
|
||||
|
||||
|
||||
[Header("Misc")]
|
||||
public float metersPerUnit = 1f; // scale: 1 unit = 1 meter
|
||||
|
||||
|
||||
[Header("Storage")]
|
||||
Dictionary<long, Vector2> nodes = new Dictionary<long, Vector2>(); // id -> latlon
|
||||
List<Way> parsedWays = new List<Way>();
|
||||
|
||||
void Start()
|
||||
{
|
||||
StartCoroutine(RenderMap());
|
||||
}
|
||||
IEnumerator RenderMap()
|
||||
{
|
||||
ClearChildren();
|
||||
|
||||
double[] GPS = gpsManager.GetLastCoords();
|
||||
latitude = GPS[0];
|
||||
longitude = GPS[1];
|
||||
|
||||
string q = $"[out:xml][timeout:90];(way[\"building\"](around:{queryRadiusMeters.ToString().Replace(",", ".")},{latitude.ToString().Replace(",", ".")},{longitude.ToString().Replace(",", ".")});way[\"highway\"](around:{queryRadiusMeters.ToString().Replace(",", ".")},{latitude.ToString().Replace(",", ".")},{longitude.ToString().Replace(",", ".")}););(._;>;);out body;";
|
||||
|
||||
WWWForm form = new WWWForm();
|
||||
form.AddField("data", q);
|
||||
|
||||
using (UnityWebRequest www = UnityWebRequest.Post(overpassUrl, form))
|
||||
{
|
||||
www.downloadHandler = new DownloadHandlerBuffer();
|
||||
yield return www.SendWebRequest();
|
||||
|
||||
if (www.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Debug.LogError("Overpass request failed: " + www.error);
|
||||
yield break;
|
||||
}
|
||||
|
||||
string xml = www.downloadHandler.text;
|
||||
ParseOverpassXml(xml);
|
||||
|
||||
GameObject buildingsRoot = new GameObject("Buildings");
|
||||
buildingsRoot.transform.parent = this.transform;
|
||||
|
||||
GameObject roadsRoot = new GameObject("Roads");
|
||||
roadsRoot.transform.parent = this.transform;
|
||||
|
||||
foreach (var w in parsedWays)
|
||||
{
|
||||
if (w.tags.ContainsKey("building"))
|
||||
{
|
||||
GameObject b = BuildBuildingMesh(w);
|
||||
b.transform.parent = buildingsRoot.transform;
|
||||
}
|
||||
else if (w.tags.ContainsKey("highway"))
|
||||
{
|
||||
GameObject r = BuildRoadMesh(w);
|
||||
r.transform.parent = roadsRoot.transform;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("Map generation complete: " + parsedWays.Count + " ways, " + nodes.Count + " nodes.");
|
||||
}
|
||||
yield return StartCoroutine(RenderMap());
|
||||
}
|
||||
|
||||
void ClearChildren()
|
||||
{
|
||||
List<GameObject> toDestroy = new List<GameObject>();
|
||||
foreach (Transform t in transform)
|
||||
toDestroy.Add(t.gameObject);
|
||||
foreach (var g in toDestroy)
|
||||
DestroyImmediate(g);
|
||||
}
|
||||
|
||||
#region Overpass XML parsing
|
||||
class Way
|
||||
{
|
||||
public long id;
|
||||
public List<long> nodeRefs = new List<long>();
|
||||
public Dictionary<string, string> tags = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ParseOverpassXml(string xmlText)
|
||||
{
|
||||
nodes.Clear();
|
||||
parsedWays.Clear();
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(xmlText);
|
||||
|
||||
XmlNode osm = doc.SelectSingleNode("/osm");
|
||||
if (osm == null) return;
|
||||
|
||||
// parse nodes
|
||||
foreach (XmlNode node in osm.SelectNodes("node"))
|
||||
{
|
||||
long id = long.Parse(node.Attributes["id"].Value, CultureInfo.InvariantCulture);
|
||||
double lat = double.Parse(node.Attributes["lat"].Value, CultureInfo.InvariantCulture);
|
||||
double lon = double.Parse(node.Attributes["lon"].Value, CultureInfo.InvariantCulture);
|
||||
nodes[id] = new Vector2((float)lat, (float)lon);
|
||||
}
|
||||
|
||||
// parse ways
|
||||
foreach (XmlNode wayNode in osm.SelectNodes("way"))
|
||||
{
|
||||
Way w = new Way();
|
||||
w.id = long.Parse(wayNode.Attributes["id"].Value, CultureInfo.InvariantCulture);
|
||||
foreach (XmlNode child in wayNode.ChildNodes)
|
||||
{
|
||||
if (child.Name == "nd")
|
||||
{
|
||||
long r = long.Parse(child.Attributes["ref"].Value, CultureInfo.InvariantCulture);
|
||||
w.nodeRefs.Add(r);
|
||||
}
|
||||
else if (child.Name == "tag")
|
||||
{
|
||||
string k = child.Attributes["k"].Value;
|
||||
string v = child.Attributes["v"].Value;
|
||||
w.tags[k] = v;
|
||||
}
|
||||
}
|
||||
parsedWays.Add(w);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Utilities: latlon to local meters
|
||||
// Convert latitude/longitude to local XY meters relative to center point
|
||||
Vector3 LatLonToLocal(double lat, double lon)
|
||||
{
|
||||
// Use simple equirectangular projection around center (latitude, longitude)
|
||||
double lat0 = latitude;
|
||||
double lon0 = longitude;
|
||||
double dLat = (lat - lat0) * Mathf.Deg2Rad;
|
||||
double dLon = (lon - lon0) * Mathf.Deg2Rad;
|
||||
double R = 6378137.0; // Earth radius in meters
|
||||
double x = R * dLon * Math.Cos(lat0 * Mathf.Deg2Rad);
|
||||
double y = R * dLat;
|
||||
return new Vector3((float)x / metersPerUnit, 0f, (float)y / metersPerUnit);
|
||||
}
|
||||
Vector3 NodeIdToLocal(long nodeId)
|
||||
{
|
||||
if (!nodes.ContainsKey(nodeId))
|
||||
return Vector3.zero;
|
||||
Vector2 latlon = nodes[nodeId];
|
||||
return LatLonToLocal(latlon.x, latlon.y);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Mesh builders
|
||||
GameObject BuildBuildingMesh(Way w)
|
||||
{
|
||||
// gather polygon points
|
||||
List<Vector3> poly = new List<Vector3>();
|
||||
foreach (var id in w.nodeRefs)
|
||||
{
|
||||
Vector3 p = NodeIdToLocal(id);
|
||||
poly.Add(p);
|
||||
}
|
||||
|
||||
// ensure closed
|
||||
if (poly.Count < 3) return null;
|
||||
if ((poly[0] - poly[poly.Count - 1]).sqrMagnitude > 0.0001f)
|
||||
poly.Add(poly[0]);
|
||||
|
||||
// determine height
|
||||
float height = defaultBuildingHeight;
|
||||
if (w.tags.ContainsKey("height"))
|
||||
{
|
||||
if (TryParseHeight(w.tags["height"], out float h)) height = h;
|
||||
}
|
||||
else if (w.tags.ContainsKey("building:levels"))
|
||||
{
|
||||
if (float.TryParse(w.tags["building:levels"], NumberStyles.Float, CultureInfo.InvariantCulture, out float levels))
|
||||
height = Mathf.Max(0.5f, levels * defaultFloorHeight);
|
||||
}
|
||||
else if (w.tags.ContainsKey("levels"))
|
||||
{
|
||||
if (float.TryParse(w.tags["levels"], NumberStyles.Float, CultureInfo.InvariantCulture, out float levels))
|
||||
height = Mathf.Max(0.5f, levels * defaultFloorHeight);
|
||||
}
|
||||
|
||||
// create GameObject
|
||||
GameObject go = new GameObject("Building_" + w.id);
|
||||
MeshFilter mf = go.AddComponent<MeshFilter>();
|
||||
MeshRenderer mr = go.AddComponent<MeshRenderer>();
|
||||
mr.material = buildingMaterial;
|
||||
|
||||
// generate mesh: roof (triangulated polygon) + walls (extruded quads)
|
||||
Mesh mesh = new Mesh();
|
||||
mesh.name = "BuildingMesh_" + w.id;
|
||||
|
||||
// Convert poly to 2D points (XZ plane)
|
||||
List<Vector2> poly2D = new List<Vector2>();
|
||||
for (int i = 0; i < poly.Count - 1; i++) // omit last repeated point
|
||||
poly2D.Add(new Vector2(poly[i].x, poly[i].z));
|
||||
|
||||
// triangulate roof
|
||||
List<int> roofTris = Triangulate(poly2D);
|
||||
if (roofTris == null || roofTris.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("Triangulation failed for building " + w.id);
|
||||
return go;
|
||||
}
|
||||
|
||||
// Build vertices: roof vertices at y=height, walls vertices (2 per poly vertex)
|
||||
int n = poly2D.Count;
|
||||
// Build vertices and triangles with NO SHARED VERTICES (flat shading)
|
||||
List<Vector3> verts = new List<Vector3>();
|
||||
List<int> triangles = new List<int>();
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
|
||||
// Roof triangles - each triangle gets its own vertices
|
||||
for (int i = 0; i < roofTris.Count; i += 3)
|
||||
{
|
||||
int idx0 = roofTris[i];
|
||||
int idx1 = roofTris[i + 1];
|
||||
int idx2 = roofTris[i + 2];
|
||||
|
||||
Vector2 p0 = poly2D[idx0];
|
||||
Vector2 p1 = poly2D[idx1];
|
||||
Vector2 p2 = poly2D[idx2];
|
||||
|
||||
int baseIdx = verts.Count;
|
||||
verts.Add(new Vector3(p0.x, height / metersPerUnit, p0.y));
|
||||
verts.Add(new Vector3(p1.x, height / metersPerUnit, p1.y));
|
||||
verts.Add(new Vector3(p2.x, height / metersPerUnit, p2.y));
|
||||
|
||||
triangles.Add(baseIdx);
|
||||
triangles.Add(baseIdx + 1);
|
||||
triangles.Add(baseIdx + 2);
|
||||
|
||||
uvs.Add(new Vector2(p0.x, p0.y));
|
||||
uvs.Add(new Vector2(p1.x, p1.y));
|
||||
uvs.Add(new Vector2(p2.x, p2.y));
|
||||
}
|
||||
|
||||
// Walls - each quad gets its own 4 vertices
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
int iNext = (i + 1) % n;
|
||||
Vector2 p0 = poly2D[i];
|
||||
Vector2 p1 = poly2D[iNext];
|
||||
|
||||
int baseIdx = verts.Count;
|
||||
verts.Add(new Vector3(p0.x, height / metersPerUnit, p0.y)); // top left
|
||||
verts.Add(new Vector3(p0.x, 0, p0.y)); // bottom left
|
||||
verts.Add(new Vector3(p1.x, 0, p1.y)); // bottom right
|
||||
verts.Add(new Vector3(p1.x, height / metersPerUnit, p1.y)); // top right
|
||||
|
||||
triangles.Add(baseIdx);
|
||||
triangles.Add(baseIdx + 1);
|
||||
triangles.Add(baseIdx + 2);
|
||||
|
||||
triangles.Add(baseIdx);
|
||||
triangles.Add(baseIdx + 2);
|
||||
triangles.Add(baseIdx + 3);
|
||||
|
||||
uvs.Add(new Vector2(0, 1));
|
||||
uvs.Add(new Vector2(0, 0));
|
||||
uvs.Add(new Vector2(1, 0));
|
||||
uvs.Add(new Vector2(1, 1));
|
||||
}
|
||||
|
||||
mesh.SetVertices(verts);
|
||||
mesh.SetTriangles(triangles, 0);
|
||||
mesh.SetUVs(0, uvs);
|
||||
mesh.RecalculateNormals();
|
||||
mesh.RecalculateBounds();
|
||||
|
||||
mf.mesh = mesh;
|
||||
|
||||
// Center object (using first roof vertex as reference)
|
||||
Vector3 centroid = Vector3.zero;
|
||||
for (int i = 0; i < roofTris.Count; i += 3)
|
||||
{
|
||||
centroid += verts[i];
|
||||
}
|
||||
centroid /= (roofTris.Count / 3);
|
||||
go.transform.position = centroid * -1f;
|
||||
|
||||
// Move the roof/walls vertices back to local space
|
||||
Vector3[] adjustedVerts = mesh.vertices;
|
||||
for (int i = 0; i < adjustedVerts.Length; i++) adjustedVerts[i] += centroid;
|
||||
mesh.vertices = adjustedVerts;
|
||||
mesh.RecalculateNormals();
|
||||
mesh.RecalculateBounds();
|
||||
|
||||
return go;
|
||||
}
|
||||
|
||||
GameObject BuildRoadMesh(Way w)
|
||||
{
|
||||
// build polyline
|
||||
List<Vector3> pts = new List<Vector3>();
|
||||
foreach (var id in w.nodeRefs)
|
||||
pts.Add(NodeIdToLocal(id));
|
||||
if (pts.Count < 2) return null;
|
||||
|
||||
float width = defaultRoadWidth;
|
||||
if (w.tags.ContainsKey("width") && float.TryParse(w.tags["width"], NumberStyles.Float, CultureInfo.InvariantCulture, out float wv))
|
||||
width = wv;
|
||||
else if (w.tags.ContainsKey("highway"))
|
||||
{
|
||||
// simple heuristic
|
||||
string h = w.tags["highway"];
|
||||
if (h == "motorway") width = motorwayWidth;
|
||||
else if (h == "primary") width = primaryWidth;
|
||||
else if (h == "secondary") width = secondaryWidth;
|
||||
else if (h == "tertiary") width = tertiaryWidth;
|
||||
else width = defaultRoadWidth;
|
||||
}
|
||||
|
||||
GameObject go = new GameObject("Road_" + w.id);
|
||||
MeshFilter mf = go.AddComponent<MeshFilter>();
|
||||
MeshRenderer mr = go.AddComponent<MeshRenderer>();
|
||||
mr.material = roadMaterial;
|
||||
|
||||
Mesh mesh = new Mesh();
|
||||
mesh.name = "RoadMesh_" + w.id;
|
||||
|
||||
List<Vector3> verts = new List<Vector3>();
|
||||
List<int> tris = new List<int>();
|
||||
List<Vector2> uvs = new List<Vector2>();
|
||||
|
||||
// build quad strip
|
||||
for (int i = 0; i < pts.Count; i++)
|
||||
{
|
||||
Vector3 p = pts[i];
|
||||
Vector3 dir;
|
||||
if (i == 0) dir = (pts[i + 1] - p).normalized;
|
||||
else if (i == pts.Count - 1) dir = (p - pts[i - 1]).normalized;
|
||||
else dir = (pts[i + 1] - pts[i - 1]).normalized;
|
||||
|
||||
Vector3 normal = Vector3.Cross(dir, Vector3.up).normalized;
|
||||
Vector3 left = p + normal * (width * 0.5f / metersPerUnit);
|
||||
Vector3 right = p - normal * (width * 0.5f / metersPerUnit);
|
||||
verts.Add(left);
|
||||
verts.Add(right);
|
||||
uvs.Add(new Vector2(0, i));
|
||||
uvs.Add(new Vector2(1, i));
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
int baseIdx = verts.Count - 4;
|
||||
tris.Add(baseIdx + 0);
|
||||
tris.Add(baseIdx + 2);
|
||||
tris.Add(baseIdx + 1);
|
||||
|
||||
tris.Add(baseIdx + 1);
|
||||
tris.Add(baseIdx + 2);
|
||||
tris.Add(baseIdx + 3);
|
||||
}
|
||||
}
|
||||
|
||||
mesh.SetVertices(verts);
|
||||
mesh.SetTriangles(tris, 0);
|
||||
mesh.SetUVs(0, uvs);
|
||||
mesh.RecalculateNormals();
|
||||
mesh.RecalculateBounds();
|
||||
|
||||
mf.mesh = mesh;
|
||||
go.transform.position = Vector3.zero;
|
||||
return go;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
bool TryParseHeight(string s, out float meters)
|
||||
{
|
||||
// try to parse heights like "12", "12.5m", "40 ft"
|
||||
s = s.Trim();
|
||||
meters = 0f;
|
||||
if (s.EndsWith("m")) s = s.Substring(0, s.Length - 1).Trim();
|
||||
if (float.TryParse(s, NumberStyles.Float, CultureInfo.InvariantCulture, out float v))
|
||||
{
|
||||
meters = v;
|
||||
return true;
|
||||
}
|
||||
// fallback: try to extract number
|
||||
StringBuilder num = new StringBuilder();
|
||||
foreach (char c in s)
|
||||
if ((c >= '0' && c <= '9') || c == '.' || c == ',') num.Append(c == ',' ? '.' : c);
|
||||
if (num.Length > 0 && float.TryParse(num.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, out v))
|
||||
{
|
||||
meters = v; return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Basic ear clipping triangulation for simple polygons (2D)
|
||||
List<int> Triangulate(List<Vector2> poly)
|
||||
{
|
||||
List<int> indices = new List<int>();
|
||||
int n = poly.Count;
|
||||
if (n < 3) return indices;
|
||||
|
||||
List<int> V = new List<int>();
|
||||
for (int i = 0; i < n; i++) V.Add(i);
|
||||
|
||||
int guard = 0;
|
||||
while (V.Count > 3 && guard < 10000)
|
||||
{
|
||||
bool earFound = false;
|
||||
for (int i = 0; i < V.Count; i++)
|
||||
{
|
||||
int prev = V[(i - 1 + V.Count) % V.Count];
|
||||
int curr = V[i];
|
||||
int next = V[(i + 1) % V.Count];
|
||||
|
||||
Vector2 a = poly[prev];
|
||||
Vector2 b = poly[curr];
|
||||
Vector2 c = poly[next];
|
||||
|
||||
if (!IsConvex(a, b, c)) continue;
|
||||
|
||||
bool hasPointInside = false;
|
||||
for (int j = 0; j < V.Count; j++)
|
||||
{
|
||||
int vi = V[j];
|
||||
if (vi == prev || vi == curr || vi == next) continue;
|
||||
if (PointInTriangle(poly[vi], a, b, c)) { hasPointInside = true; break; }
|
||||
}
|
||||
if (hasPointInside) continue;
|
||||
|
||||
// ear found
|
||||
indices.Add(prev);
|
||||
indices.Add(curr);
|
||||
indices.Add(next);
|
||||
V.RemoveAt(i);
|
||||
earFound = true;
|
||||
break;
|
||||
}
|
||||
if (!earFound) break;
|
||||
guard++;
|
||||
}
|
||||
|
||||
if (V.Count == 3)
|
||||
{
|
||||
indices.Add(V[0]); indices.Add(V[1]); indices.Add(V[2]);
|
||||
}
|
||||
|
||||
return indices;
|
||||
}
|
||||
|
||||
bool IsConvex(Vector2 a, Vector2 b, Vector2 c)
|
||||
{
|
||||
return ((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x)) < 0f; // changed > to
|
||||
}
|
||||
bool PointInTriangle(Vector2 p, Vector2 a, Vector2 b, Vector2 c)
|
||||
{
|
||||
float area = TriangleArea(a, b, c);
|
||||
float area1 = TriangleArea(p, b, c);
|
||||
float area2 = TriangleArea(a, p, c);
|
||||
float area3 = TriangleArea(a, b, p);
|
||||
return Mathf.Abs(area - (area1 + area2 + area3)) < 1e-3f;
|
||||
}
|
||||
|
||||
float TriangleArea(Vector2 a, Vector2 b, Vector2 c)
|
||||
{
|
||||
return Mathf.Abs((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y)) * 0.5f);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
30
Assets/Scripts/PlayAudioOnCamera.cs
Normal file
30
Assets/Scripts/PlayAudioOnCamera.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayAudioOnCamera : MonoBehaviour
|
||||
{
|
||||
public AudioClip clip; // assign your audio file in the Inspector
|
||||
private AudioSource audioSource;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Get or add an AudioSource to this GameObject
|
||||
audioSource = gameObject.GetComponent<AudioSource>();
|
||||
if (audioSource == null)
|
||||
{
|
||||
audioSource = gameObject.AddComponent<AudioSource>();
|
||||
}
|
||||
|
||||
// Assign the audio clip
|
||||
if (clip != null)
|
||||
{
|
||||
audioSource.clip = clip;
|
||||
audioSource.playOnAwake = false;
|
||||
audioSource.loop = false; // change to true if you want looping
|
||||
audioSource.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("PlayAudioOnCamera: No audio clip assigned!");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/PlayAudioOnCamera.cs.meta
Normal file
2
Assets/Scripts/PlayAudioOnCamera.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37f33c8b63e5b384db6a385b909b27aa
|
||||
29
Assets/Scripts/TeleportOnTrigger.cs
Normal file
29
Assets/Scripts/TeleportOnTrigger.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class TeleportOnTrigger : MonoBehaviour
|
||||
{
|
||||
[Header("Teleport Target")]
|
||||
public Transform targetPosition;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (targetPosition == null) return;
|
||||
|
||||
Rigidbody rb = other.attachedRigidbody;
|
||||
|
||||
if (rb != null)
|
||||
{
|
||||
// STOP ALL MOTION
|
||||
rb.linearVelocity = Vector3.zero;
|
||||
rb.angularVelocity = Vector3.zero;
|
||||
|
||||
// TELEPORT
|
||||
rb.position = targetPosition.position;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Non-physics objects
|
||||
other.transform.position = targetPosition.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/TeleportOnTrigger.cs.meta
Normal file
2
Assets/Scripts/TeleportOnTrigger.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e101cb487f02244592e16548d98f0b5
|
||||
@@ -1,84 +0,0 @@
|
||||
%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: TestMaterial
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _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: 0}
|
||||
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}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.1254902, g: 0.1254902, b: 0.1254902, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
187
Assets/Scripts/TiltHoleMiniGameManager.cs
Normal file
187
Assets/Scripts/TiltHoleMiniGameManager.cs
Normal file
@@ -0,0 +1,187 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class TiltHoleMiniGameManager : MonoBehaviour, ITask
|
||||
{
|
||||
// =========================
|
||||
// ITask PROPERTIES
|
||||
// =========================
|
||||
|
||||
public string TaskID { get; private set; } = "TILT_HOLE_01";
|
||||
public TaskType TaskType { get; private set; } = TaskType.Task;
|
||||
public string TaskName { get; private set; } = "Tilt Ball Into Hole";
|
||||
public (double, double) TaskLocation { get; private set; } = (0, 0);
|
||||
public bool IsCompleted { get; private set; }
|
||||
|
||||
private Action<ITask> _onCompletedCallback;
|
||||
|
||||
// =========================
|
||||
// MINIGAME REFERENCES
|
||||
// =========================
|
||||
|
||||
[Header("References")]
|
||||
public GyroPlatformController platformController;
|
||||
public HoleGoalTrigger goalTrigger;
|
||||
public Rigidbody ball;
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioClip startSound;
|
||||
public AudioClip winSound;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
[Header("Game State")]
|
||||
public bool isActive = false;
|
||||
|
||||
[Header("Win Behavior")]
|
||||
public bool freezeOnWin = true;
|
||||
public bool disableBallOnWin = false;
|
||||
|
||||
// =========================
|
||||
// UNITY LIFECYCLE
|
||||
// =========================
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (platformController == null) platformController = FindFirstObjectByType<GyroPlatformController>();
|
||||
if (goalTrigger == null) goalTrigger = FindFirstObjectByType<HoleGoalTrigger>();
|
||||
|
||||
if (Camera.main != null)
|
||||
{
|
||||
audioSource = Camera.main.GetComponent<AudioSource>();
|
||||
if (audioSource == null)
|
||||
audioSource = Camera.main.gameObject.AddComponent<AudioSource>();
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (goalTrigger != null)
|
||||
{
|
||||
goalTrigger.OnBallScored += HandleWin;
|
||||
}
|
||||
|
||||
if (ball != null && goalTrigger != null)
|
||||
{
|
||||
goalTrigger.ballRigidbody = ball;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (goalTrigger != null)
|
||||
goalTrigger.OnBallScored -= HandleWin;
|
||||
}
|
||||
|
||||
// =========================
|
||||
// TASK LIFECYCLE
|
||||
// =========================
|
||||
|
||||
public void Initialize(Action<ITask> onCompleted)
|
||||
{
|
||||
Debug.Log("Initializing Tilt Hole Task");
|
||||
|
||||
IsCompleted = false;
|
||||
isActive = true;
|
||||
_onCompletedCallback = onCompleted;
|
||||
|
||||
if (platformController != null)
|
||||
platformController.enabled = true;
|
||||
|
||||
if (ball != null)
|
||||
{
|
||||
ball.isKinematic = false;
|
||||
ball.linearVelocity = Vector3.zero;
|
||||
ball.angularVelocity = Vector3.zero;
|
||||
}
|
||||
|
||||
if (startSound != null && audioSource != null)
|
||||
{
|
||||
audioSource.PlayOneShot(startSound);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitTask(Action<ITask> onExit)
|
||||
{
|
||||
Debug.Log("Exiting Tilt Hole Task");
|
||||
|
||||
isActive = false;
|
||||
|
||||
if (platformController != null)
|
||||
platformController.enabled = false;
|
||||
|
||||
onExit?.Invoke(this);
|
||||
}
|
||||
|
||||
public void Complete()
|
||||
{
|
||||
if (IsCompleted) return;
|
||||
|
||||
Debug.Log("Task Complete: Tilt Hole");
|
||||
|
||||
IsCompleted = true;
|
||||
isActive = false;
|
||||
|
||||
if (winSound != null && audioSource != null)
|
||||
{
|
||||
audioSource.PlayOneShot(winSound);
|
||||
}
|
||||
|
||||
_onCompletedCallback?.Invoke(this);
|
||||
ExitTask(null);
|
||||
}
|
||||
|
||||
// =========================
|
||||
// MINIGAME WIN EVENT
|
||||
// =========================
|
||||
|
||||
private void HandleWin()
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
Debug.Log("Ball reached hole.");
|
||||
|
||||
if (freezeOnWin)
|
||||
{
|
||||
if (platformController != null)
|
||||
platformController.enabled = false;
|
||||
|
||||
if (ball != null)
|
||||
{
|
||||
ball.linearVelocity = Vector3.zero;
|
||||
ball.angularVelocity = Vector3.zero;
|
||||
ball.isKinematic = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (disableBallOnWin && ball != null)
|
||||
{
|
||||
ball.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
Complete(); // 🔥 THIS completes the task
|
||||
}
|
||||
|
||||
// =========================
|
||||
// DEBUG GUI
|
||||
// =========================
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
GUIStyle s = new GUIStyle(GUI.skin.label);
|
||||
s.fontSize = 24;
|
||||
|
||||
if (isActive)
|
||||
{
|
||||
s.normal.textColor = Color.white;
|
||||
GUI.Label(new Rect(10, 10, 700, 30),
|
||||
"Goal: Tilt platform to roll the ball into the hole.", s);
|
||||
}
|
||||
else if (IsCompleted)
|
||||
{
|
||||
s.normal.textColor = Color.yellow;
|
||||
GUI.Label(new Rect(10, 10, 700, 30),
|
||||
"Task Completed!", s);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/TiltHoleMiniGameManager.cs.meta
Normal file
2
Assets/Scripts/TiltHoleMiniGameManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f70c5a8e211b7142b26b4ea95bf2348
|
||||
51
Assets/Scripts/WindController.cs
Normal file
51
Assets/Scripts/WindController.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WindController : MonoBehaviour
|
||||
{
|
||||
[Header("settings větru")]
|
||||
[Tooltip("Maximální síla větru (kladná i záporná)")]
|
||||
public float maxWindTorque = 8f;
|
||||
|
||||
[Tooltip("Jak rychle se větr mění směrem/sílou")]
|
||||
public float windChangeSpeed = 0.6f;
|
||||
|
||||
[Tooltip("Jak často se objeví silnější vichřice (v sekundách)")]
|
||||
public float gustInterval = 4f;
|
||||
|
||||
[Tooltip("Multiplier pro sílu vichřice")]
|
||||
public float gustMultiplier = 2.0f;
|
||||
|
||||
public float CurrentWindTorque { get; private set; }
|
||||
|
||||
private float targetTorque;
|
||||
private float gustTimer;
|
||||
|
||||
void Start()
|
||||
{
|
||||
PickNewTargetTorque();
|
||||
gustTimer = gustInterval;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Smoothly move wind toward target torque
|
||||
CurrentWindTorque = Mathf.Lerp(CurrentWindTorque, targetTorque, Time.deltaTime * windChangeSpeed);
|
||||
|
||||
// Occasional gusts
|
||||
gustTimer -= Time.deltaTime;
|
||||
if (gustTimer <= 0f)
|
||||
{
|
||||
// Apply a short gust by shifting target torque more aggressively
|
||||
float gust = Random.Range(-maxWindTorque, maxWindTorque) * gustMultiplier;
|
||||
targetTorque = Mathf.Clamp(gust, -maxWindTorque * gustMultiplier, maxWindTorque * gustMultiplier);
|
||||
|
||||
gustTimer = gustInterval;
|
||||
Invoke(nameof(PickNewTargetTorque), 0.8f); // gust lasts ~0.8s
|
||||
}
|
||||
}
|
||||
|
||||
private void PickNewTargetTorque()
|
||||
{
|
||||
targetTorque = Random.Range(-maxWindTorque, maxWindTorque);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/WindController.cs.meta
Normal file
2
Assets/Scripts/WindController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2d62d3ffa507924ab3a6fd97f185f3e
|
||||
8
Assets/Settings.meta
Normal file
8
Assets/Settings.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c41f51487bbe394b9b8568d1b254bd4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/Build Profiles.meta
Normal file
8
Assets/Settings/Build Profiles.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbad6d4e785a4584da7dda5f1bda30d5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
55
Assets/Settings/Build Profiles/Android™ 1.asset
Normal file
55
Assets/Settings/Build Profiles/Android™ 1.asset
Normal file
@@ -0,0 +1,55 @@
|
||||
%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: 15003, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: "Android\u2122 1"
|
||||
m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.Build.Profile.BuildProfile
|
||||
m_AssetVersion: 1
|
||||
m_BuildTarget: 13
|
||||
m_Subtarget: 0
|
||||
m_PlatformId: b9b35072a6f44c2e863f17467ea3dc13
|
||||
m_PlatformBuildProfile:
|
||||
rid: 240730859082350731
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_ScriptingDefines: []
|
||||
m_PlayerSettingsYaml:
|
||||
m_Settings: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 240730859082350731
|
||||
type: {class: AndroidPlatformBuildSettings, ns: UnityEditor.Android, asm: UnityEditor.Android.Extensions}
|
||||
data:
|
||||
m_Development: 0
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_AllowDebugging: 0
|
||||
m_WaitForManagedDebugger: 0
|
||||
m_ManagedDebuggerFixedPort: 0
|
||||
m_ExplicitNullChecks: 0
|
||||
m_ExplicitDivideByZeroChecks: 0
|
||||
m_ExplicitArrayBoundsChecks: 0
|
||||
m_CompressionType: 2
|
||||
m_InstallInBuildFolder: 0
|
||||
m_InsightsSettingsContainer:
|
||||
m_BuildProfileEngineDiagnosticsState: 2
|
||||
m_BuildSubtarget: 0
|
||||
m_BuildSystem: 1
|
||||
m_ExportAsGoogleAndroidProject: 0
|
||||
m_DebugSymbolLevel: 1
|
||||
m_DebugSymbolFormat: 5
|
||||
m_CurrentDeploymentTargetId: __builtin__target_default
|
||||
m_BuildType: 2
|
||||
m_LinkTimeOptimization: 0
|
||||
m_BuildAppBundle: 0
|
||||
m_IPAddressToConnect:
|
||||
m_SymlinkSources: 0
|
||||
8
Assets/Settings/Build Profiles/Android™ 1.asset.meta
Normal file
8
Assets/Settings/Build Profiles/Android™ 1.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9496285097e5d904da120cdcec6534dc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -17,7 +17,7 @@ MonoBehaviour:
|
||||
m_Subtarget: 0
|
||||
m_PlatformId: b9b35072a6f44c2e863f17467ea3dc13
|
||||
m_PlatformBuildProfile:
|
||||
rid: 5796307965217079336
|
||||
rid: 4246746364202188844
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_ScriptingDefines: []
|
||||
@@ -26,10 +26,10 @@ MonoBehaviour:
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 5796307965217079336
|
||||
- rid: 4246746364202188844
|
||||
type: {class: AndroidPlatformBuildSettings, ns: UnityEditor.Android, asm: UnityEditor.Android.Extensions}
|
||||
data:
|
||||
m_Development: 0
|
||||
m_Development: 1
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_AllowDebugging: 0
|
||||
@@ -45,10 +45,10 @@ MonoBehaviour:
|
||||
m_BuildSubtarget: 0
|
||||
m_BuildSystem: 1
|
||||
m_ExportAsGoogleAndroidProject: 0
|
||||
m_DebugSymbolLevel: 1
|
||||
m_DebugSymbolLevel: 4
|
||||
m_DebugSymbolFormat: 5
|
||||
m_CurrentDeploymentTargetId: __builtin__target_default
|
||||
m_BuildType: 2
|
||||
m_BuildType: 1
|
||||
m_LinkTimeOptimization: 0
|
||||
m_BuildAppBundle: 0
|
||||
m_IPAddressToConnect:
|
||||
|
||||
8
Assets/Settings/Build Profiles/Android™.asset.meta
Normal file
8
Assets/Settings/Build Profiles/Android™.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f18313555a02cd48bc22d29d0f2ff55
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
49
Assets/Settings/Build Profiles/iOS.asset
Normal file
49
Assets/Settings/Build Profiles/iOS.asset
Normal file
@@ -0,0 +1,49 @@
|
||||
%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: 15003, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: iOS
|
||||
m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.Build.Profile.BuildProfile
|
||||
m_AssetVersion: 1
|
||||
m_BuildTarget: 9
|
||||
m_Subtarget: 0
|
||||
m_PlatformId: ad48d16a66894befa4d8181998c3cb09
|
||||
m_PlatformBuildProfile:
|
||||
rid: 4718407457732296746
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_ScriptingDefines:
|
||||
-
|
||||
m_PlayerSettingsYaml:
|
||||
m_Settings: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 4718407457732296746
|
||||
type: {class: iOSPlatformSettings, ns: UnityEditor.iOS, asm: UnityEditor.iOS.Extensions}
|
||||
data:
|
||||
m_Development: 0
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_AllowDebugging: 0
|
||||
m_WaitForManagedDebugger: 0
|
||||
m_ManagedDebuggerFixedPort: 0
|
||||
m_ExplicitNullChecks: 0
|
||||
m_ExplicitDivideByZeroChecks: 0
|
||||
m_ExplicitArrayBoundsChecks: 0
|
||||
m_CompressionType: 0
|
||||
m_InstallInBuildFolder: 0
|
||||
m_InsightsSettingsContainer:
|
||||
m_BuildProfileEngineDiagnosticsState: 2
|
||||
m_iOSXcodeBuildConfig: 1
|
||||
m_SymlinkSources: 0
|
||||
m_PreferredXcode:
|
||||
m_SymlinkTrampoline: 0
|
||||
8
Assets/Settings/Build Profiles/iOS.asset.meta
Normal file
8
Assets/Settings/Build Profiles/iOS.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18829ddd933a57c489872a4f1a3942e4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/DefaultVolumeProfile.asset.meta
Normal file
8
Assets/Settings/DefaultVolumeProfile.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 526aab55ceaf10142a59ee4d62fe8f42
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/Mobile_RPAsset.asset.meta
Normal file
8
Assets/Settings/Mobile_RPAsset.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e9d05516516cba48aff23bd436701ca
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/Mobile_Renderer.asset.meta
Normal file
8
Assets/Settings/Mobile_Renderer.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6ba5b26dda963e43beba7012129f6a5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/PC_RPAsset.asset.meta
Normal file
8
Assets/Settings/PC_RPAsset.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c73e51f432aa184cb1408179eb09d3f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/PC_Renderer.asset.meta
Normal file
8
Assets/Settings/PC_Renderer.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fe0ebf7f09ec7e4fa76e81c31b87dde
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Settings/SampleSceneProfile.asset.meta
Normal file
8
Assets/Settings/SampleSceneProfile.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dc1b9d50da01394198653f975d9c13d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bfdf167f826294468ffbde02bb390f1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,93 +0,0 @@
|
||||
Copyright (c) 2011, Vernon Adams (vern@newtypography.co.uk),
|
||||
with Reserved Font Name Anton.
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
@@ -1,93 +0,0 @@
|
||||
Copyright (c) 2010 by vernon adams (vern@newtypography.co.uk),
|
||||
with Reserved Font Name Bangers.
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,92 +0,0 @@
|
||||
Copyright (c) 2011-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Names 'Oswald'
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,3 +0,0 @@
|
||||
This font is licensed under the Apache License, Version 2.0.
|
||||
|
||||
See the following link for full licensing terms https://www.apache.org/licenses/LICENSE-2.0
|
||||
Binary file not shown.
@@ -1,92 +0,0 @@
|
||||
Copyright (c) 2020-2021, Unity, with Reserved Font Names 'Unity'
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
@@ -1,84 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Crate - Surface Shader Scene
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _EMISSION _NORMALMAP _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 8878a782f4334ecbbcf683b3ac780966, type: 3}
|
||||
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: 602cb87b6a29443b8636370ea0751574, 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}
|
||||
m_Floats:
|
||||
- _BumpScale: 0.5
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EmissionScaleUI: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.233
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 1
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.712}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||
@@ -1,138 +0,0 @@
|
||||
%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: Crate - URP
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
- _NORMALMAP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 602cb87b6a29443b8636370ea0751574, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 8878a782f4334ecbbcf683b3ac780966, type: 3}
|
||||
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: 602cb87b6a29443b8636370ea0751574, 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: 0.5
|
||||
- _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
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.7137255}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.7137255}
|
||||
- _EmissionColor: {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 &7626160506639672020
|
||||
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:
|
||||
version: 9
|
||||
@@ -1,207 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Ground - Logo Scene
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _NORMALMAP
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 1cdc5b506b1a4a33a53c30669ced1f51, type: 3}
|
||||
m_Scale: {x: 20, y: 20}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 8b8c8a10edf94ddc8cc4cc4fcd5696a9, type: 3}
|
||||
m_Scale: {x: 30, y: 50}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BorderTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _FillTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EdgeTex
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Radius
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Cutoff
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _Shininess
|
||||
second: .220354751
|
||||
data:
|
||||
first:
|
||||
name: _Parallax
|
||||
second: .0199999996
|
||||
data:
|
||||
first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Glossiness
|
||||
second: .344000012
|
||||
data:
|
||||
first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _EmissionScaleUI
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _EdgeSoftness
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _DiffusePower
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Border
|
||||
second: .0214285739
|
||||
data:
|
||||
first:
|
||||
name: _Size
|
||||
second: .100000001
|
||||
data:
|
||||
first:
|
||||
name: _EdgeWidth
|
||||
second: 0
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 0}
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _SpecColor
|
||||
second: {r: .5, g: .5, b: .5, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColorUI
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _FaceColor
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _BorderColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -1,112 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Ground - Surface Shader Scene
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BorderTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: c45cd05946364f32aba704f0853a975b, type: 3}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
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}
|
||||
- _DetailTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EdgeTex:
|
||||
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}
|
||||
- _FillTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 85ac55597b97403c82fc6601a93cf241, type: 3}
|
||||
m_Scale: {x: 5, y: 5}
|
||||
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}
|
||||
m_Floats:
|
||||
- _Border: 0.021428574
|
||||
- _BumpScale: 0.25
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DiffusePower: 1
|
||||
- _DstBlend: 0
|
||||
- _EdgeSoftness: 0
|
||||
- _EdgeWidth: 0
|
||||
- _EmissionScaleUI: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.348
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Radius: 0
|
||||
- _Shininess: 0.24302611
|
||||
- _Size: 0.1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _Strength: 0.2
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.8784314}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
@@ -1,173 +0,0 @@
|
||||
%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: Ground - URP
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 85ac55597b97403c82fc6601a93cf241, type: 3}
|
||||
m_Scale: {x: 5, y: 5}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BorderTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: c45cd05946364f32aba704f0853a975b, type: 3}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
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}
|
||||
- _DetailTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EdgeTex:
|
||||
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}
|
||||
- _FillTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 85ac55597b97403c82fc6601a93cf241, type: 3}
|
||||
m_Scale: {x: 5, y: 5}
|
||||
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
|
||||
- _Border: 0.021428574
|
||||
- _BumpScale: 0.25
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _ColorMask: 15
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DiffusePower: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EdgeSoftness: 0
|
||||
- _EdgeWidth: 0
|
||||
- _EmissionScaleUI: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.348
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _Radius: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Shininess: 0.24302611
|
||||
- _Size: 0.1
|
||||
- _Smoothness: 0.348
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _Strength: 0.2
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BorderColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &8510939975645199906
|
||||
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:
|
||||
version: 9
|
||||
@@ -1,127 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Small Crate_diffuse
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: _EMISSION _NORMALMAP
|
||||
m_LightmapFlags: 1
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
- first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 8878a782f4334ecbbcf683b3ac780966, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 602cb87b6a29443b8636370ea0751574, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _Cutoff
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
- first:
|
||||
name: _GlossMapScale
|
||||
second: 1
|
||||
- first:
|
||||
name: _Glossiness
|
||||
second: 0.5
|
||||
- first:
|
||||
name: _GlossyReflections
|
||||
second: 1
|
||||
- first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
- first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
- first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
- first:
|
||||
name: _Parallax
|
||||
second: 0.02
|
||||
- first:
|
||||
name: _SmoothnessTextureChannel
|
||||
second: 0
|
||||
- first:
|
||||
name: _SpecularHighlights
|
||||
second: 1
|
||||
- first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
- first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
- first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
m_Colors:
|
||||
- first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
- first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -1,280 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &121924
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 22414422}
|
||||
- 222: {fileID: 22260028}
|
||||
- 114: {fileID: 11487728}
|
||||
m_Layer: 0
|
||||
m_Name: TextMeshPro Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &188050
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 224: {fileID: 22450954}
|
||||
- 222: {fileID: 22204918}
|
||||
- 114: {fileID: 11486278}
|
||||
- 114: {fileID: 11427010}
|
||||
- 114: {fileID: 11405862}
|
||||
- 225: {fileID: 22524478}
|
||||
m_Layer: 0
|
||||
m_Name: Text Popup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &11405862
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1741964061, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &11427010
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 10
|
||||
m_Right: 10
|
||||
m_Top: 10
|
||||
m_Bottom: 10
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
--- !u!114 &11486278
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.10542818, g: 0.21589755, b: 0.47794116, a: 0.9411765}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11487728
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 121924}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_text: Sample
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_outlineColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_textAlignment: 514
|
||||
m_isAlignmentEnumConverted: 1
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_firstOverflowCharacterIndex: -1
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
m_isLinkedTextComponent: 0
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_ignoreRectMaskCulling: 0
|
||||
m_ignoreCulling: 1
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 0}
|
||||
characterCount: 6
|
||||
spriteCount: 0
|
||||
spaceCount: 0
|
||||
wordCount: 1
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
materialCount: 1
|
||||
m_havePropertiesChanged: 1
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_spriteAnimator: {fileID: 0}
|
||||
m_isInputParsingRequired: 1
|
||||
m_inputSource: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_subTextObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_baseMaterial: {fileID: 2100000, guid: 316f956b856b45c448987b5018ec3ef4, type: 2}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &22204918
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
--- !u!222 &22260028
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 121924}
|
||||
--- !u!224 &22414422
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 121924}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22450954}
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &22450954
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 22414422}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!225 &22524478
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 188050}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 0
|
||||
m_BlocksRaycasts: 0
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 188050}
|
||||
m_IsPrefabParent: 1
|
||||
@@ -1,219 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &100000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 22495902}
|
||||
- component: {fileID: 3300000}
|
||||
- component: {fileID: 2300000}
|
||||
- component: {fileID: 11400000}
|
||||
- component: {fileID: 22227760}
|
||||
m_Layer: 0
|
||||
m_Name: TextMeshPro - Prefab 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!23 &2300000
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &3300000
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_text: Seems to be ok!
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_outlineColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_textAlignment: 0
|
||||
m_isAlignmentEnumConverted: 0
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_firstOverflowCharacterIndex: -1
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
m_isLinkedTextComponent: 0
|
||||
m_isTextTruncated: 0
|
||||
m_enableKerning: 0
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 0
|
||||
m_isCullingEnabled: 0
|
||||
m_ignoreRectMaskCulling: 0
|
||||
m_ignoreCulling: 1
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0.3
|
||||
m_geometrySortingOrder: 0
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 0
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 11400000}
|
||||
characterCount: 15
|
||||
spriteCount: 0
|
||||
spaceCount: 3
|
||||
wordCount: 4
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
materialCount: 1
|
||||
m_havePropertiesChanged: 1
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_spriteAnimator: {fileID: 0}
|
||||
m_isInputParsingRequired: 1
|
||||
m_inputSource: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_renderer: {fileID: 2300000}
|
||||
m_subTextObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_maskType: 0
|
||||
--- !u!222 &22227760
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
--- !u!224 &22495902
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -4.87}
|
||||
m_SizeDelta: {x: 28.005241, y: 4.035484}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 100000}
|
||||
m_IsPrefabParent: 1
|
||||
@@ -1,219 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &100000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 22478072}
|
||||
- component: {fileID: 3300000}
|
||||
- component: {fileID: 2300000}
|
||||
- component: {fileID: 11400000}
|
||||
- component: {fileID: 22224556}
|
||||
m_Layer: 0
|
||||
m_Name: TextMeshPro - Prefab 2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!23 &2300000
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &3300000
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_text: Hello World!
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_outlineColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_textAlignment: 0
|
||||
m_isAlignmentEnumConverted: 0
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_firstOverflowCharacterIndex: -1
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
m_isLinkedTextComponent: 0
|
||||
m_isTextTruncated: 0
|
||||
m_enableKerning: 0
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 0
|
||||
m_isCullingEnabled: 0
|
||||
m_ignoreRectMaskCulling: 0
|
||||
m_ignoreCulling: 1
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0.3
|
||||
m_geometrySortingOrder: 0
|
||||
m_firstVisibleCharacter: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 0
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_textInfo:
|
||||
textComponent: {fileID: 11400000}
|
||||
characterCount: 12
|
||||
spriteCount: 0
|
||||
spaceCount: 1
|
||||
wordCount: 2
|
||||
linkCount: 0
|
||||
lineCount: 1
|
||||
pageCount: 1
|
||||
materialCount: 1
|
||||
m_havePropertiesChanged: 1
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_spriteAnimator: {fileID: 0}
|
||||
m_isInputParsingRequired: 1
|
||||
m_inputSource: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_renderer: {fileID: 2300000}
|
||||
m_subTextObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_maskType: 0
|
||||
--- !u!222 &22224556
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
--- !u!224 &22478072
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 4.48}
|
||||
m_SizeDelta: {x: 19.604034, y: 4.035484}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 100000}
|
||||
m_IsPrefabParent: 1
|
||||
@@ -1,17 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3}
|
||||
m_Name: Blue to Purple - Vertical
|
||||
m_EditorClassIdentifier:
|
||||
topLeft: {r: 0, g: 0.83448267, b: 1, a: 1}
|
||||
topRight: {r: 0.1544118, g: 0.5801215, b: 1, a: 1}
|
||||
bottomLeft: {r: 0.49168324, g: 0, b: 0.7058823, a: 1}
|
||||
bottomRight: {r: 0.4901961, g: 0, b: 0.7019608, a: 1}
|
||||
@@ -1,17 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3}
|
||||
m_Name: Dark to Light Green - Vertical
|
||||
m_EditorClassIdentifier:
|
||||
topLeft: {r: 0, g: .661764741, b: 0, a: 1}
|
||||
topRight: {r: 0, g: .573529422, b: .00224910071, a: 1}
|
||||
bottomLeft: {r: .525490224, g: 1, b: .490196109, a: 1}
|
||||
bottomRight: {r: .421999991, g: .992156923, b: .374000013, a: 1}
|
||||
@@ -1,17 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3}
|
||||
m_Name: Light to Dark Green - Vertical
|
||||
m_EditorClassIdentifier:
|
||||
topLeft: {r: 0.5147059, g: 1, b: 0.5147059, a: 1}
|
||||
topRight: {r: 0.5137255, g: 1, b: 0.5137255, a: 1}
|
||||
bottomLeft: {r: 0, g: 0.46323532, b: 0, a: 1}
|
||||
bottomRight: {r: 0, g: 0.46274513, b: 0, a: 1}
|
||||
@@ -1,17 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3}
|
||||
m_Name: Yellow to Orange - Vertical
|
||||
m_EditorClassIdentifier:
|
||||
topLeft: {r: 1, g: 1, b: 0.5661765, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 0.252, a: 1}
|
||||
bottomLeft: {r: 1, g: 0, b: 0, a: 1}
|
||||
bottomRight: {r: 1, g: 0, b: 0, a: 1}
|
||||
@@ -1,104 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Anton SDF - Drop Shadow
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28933816116536082, guid: 8a89fa14b10d46a99122fd4f73fca9a2,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0.1
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.1
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.6770833
|
||||
- _ScaleRatioC: 0.64125
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0.5
|
||||
- _UnderlayOffsetY: -0.5
|
||||
- _UnderlaySoftness: 0.05
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
@@ -1,104 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Anton SDF - Outline
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ShaderKeywords: OUTLINE_ON
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28933816116536082, guid: 8a89fa14b10d46a99122fd4f73fca9a2,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0.1
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.1
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.8333333
|
||||
- _ScaleRatioB: 0.6770833
|
||||
- _ScaleRatioC: 0.59375
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
@@ -1,104 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Anton SDF - Sunny Days
|
||||
m_Shader: {fileID: 4800000, guid: 68e6db2ebdc24f95958faec2be5558d6, type: 3}
|
||||
m_ShaderKeywords: BEVEL_ON UNDERLAY_ON
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 2800000, guid: 17c350171f7a3ca479f830547c66d187, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: -0.15}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28933816116536082, guid: 8a89fa14b10d46a99122fd4f73fca9a2,
|
||||
type: 2}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 2800000, guid: 1cdc5b506b1a4a33a53c30669ced1f51, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.25
|
||||
- _BevelClamp: 0.345
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _ColorMask: 15
|
||||
- _Diffuse: 0.5
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0.1
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0.15
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.9
|
||||
- _ScaleRatioB: 0.7875
|
||||
- _ScaleRatioC: 0.7875
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 1
|
||||
- _Sharpness: 0
|
||||
- _SpecularPower: 2
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 1024
|
||||
- _TextureWidth: 1024
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0.75
|
||||
- _UnderlayOffsetY: -0.75
|
||||
- _UnderlaySoftness: 0.1
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.5
|
||||
- _WeightNormal: 0
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0.5882353, g: 0.5882353, b: 0.5882353, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 0.9921569, g: 0.90196085, b: 0.40000004, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user