Essentials + extra crap

Loadings
Startups
Movement
Camera
This commit is contained in:
ThomasCharester committed 2026-01-12 18:43:51 +03:00
1 parent 662f4a1d05
commit 5f5ace1b52
734 files changed
+107323 -1713

No files matched your search

@@ -0,0 +1,26 @@
using UnityEngine;
namespace FastScriptReload.Tests.Runtime.Integration.CodePatterns
{
public class AccessingIdentifierNamedSameAsMethod : MonoBehaviour
{
private AccessingIdentifierNamedSameAsMethodTesting testing;
private AccessingIdentifierNamedSameAsMethod instance;
public void TestInstanceFieldTypeRewritten()
{
instance = new AccessingIdentifierNamedSameAsMethod();
//<mock-runtime-code-change>// TestDetourConfirmation.Confirm(this.GetType(), nameof(TestInstanceFieldTypeRewritten), typeof(AccessingIdentifierNamedSameAsMethod__Patched_).Name);
}
public void TestAccessingSameNamedVariableNotChanged() {
testing = new AccessingIdentifierNamedSameAsMethodTesting();
//<mock-runtime-code-change>// TestDetourConfirmation.Confirm(this.GetType(), nameof(TestAccessingSameNamedVariableNotChanged), testing.AccessingIdentifierNamedSameAsMethod);
}
}
public class AccessingIdentifierNamedSameAsMethodTesting
{
public bool AccessingIdentifierNamedSameAsMethod { get; set; } = true;
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 9547b5fa81e34288864da7ad1ebadaad
timeCreated: 1681213862
AssetOrigin:
serializedVersion: 1
productId: 239351
packageName: Fast Script Reload
packageVersion: 1.6.1
assetPath: Assets/FastScriptReload/Tests/Runtime/Integration/CodePatterns/AccessingIdentifierNamedSameAsMethod.cs
uploadId: 710802
@@ -0,0 +1,16 @@
using UnityEngine;
namespace FastScriptReload.Tests.Runtime.Integration.CodePatterns
{
public class AccessingNewFieldsAddedAtRuntimeSameNameAsStaticClassField : MonoBehaviour
{
//<mock-runtime-code-change>// public bool deltaTime = true;
//when using newly added field that has same name as static class field name, it should not get rewritten
public void CompileTest()
{
//<mock-runtime-code-change>// var value = Time.deltaTime; //this value should not get rewritten
//<mock-runtime-code-change>// var value1 = deltaTime;
}
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ddb97ae516ba487889da696ce441c0a3
timeCreated: 1697442187
AssetOrigin:
serializedVersion: 1
productId: 239351
packageName: Fast Script Reload
packageVersion: 1.6.1
assetPath: Assets/FastScriptReload/Tests/Runtime/Integration/CodePatterns/AccessingNewFieldsAddedAtRuntimeSameNameAsStaticClassField.cs
uploadId: 710802
@@ -0,0 +1,29 @@
using UnityEngine;
namespace FastScriptReload.Tests.Runtime.Integration.CodePatterns
{
public class MethodAccessingNestedEnum : MonoBehaviour
{
internal enum NestedEnum
{
Value0 = 0,
Value1 = 1,
Value2 = 2
}
private NestedEnum _value = MethodAccessingNestedEnum.NestedEnum.Value0;
public void AssignNestedEnumToField()
{
_value = NestedEnum.Value1;
//<mock-runtime-code-change>// _value = NestedEnum.Value2;
//<mock-runtime-code-change>// TestDetourConfirmation.Confirm(this.GetType(), nameof(AssignNestedEnumToField), _value);
}
public void AssignValueValue1ToNestedEnumField()
{
//<mock-runtime-code-change>// _value = NestedEnum.Value1;
//<mock-runtime-code-change>// TestDetourConfirmation.Confirm(this.GetType(), nameof(AssignValueValue1ToNestedEnumField), _value);
}
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 0f0dfa597dcc38e439dff76057c6fd93
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 239351
packageName: Fast Script Reload
packageVersion: 1.6.1
assetPath: Assets/FastScriptReload/Tests/Runtime/Integration/CodePatterns/MethodAccessingNestedEnum.cs
uploadId: 710802
@@ -0,0 +1,24 @@
using UnityEngine;
namespace FastScriptReload.Tests.Runtime.Integration.CodePatterns
{
public class NewFieldInitDictionariesWithLocalFunction : MonoBehaviour
{
public void CompileTest()
{
LocalFunction();
void LocalFunction()
{
object a = 1;
if (a is not int)
{
return;
}
Debug.Log("Test");
}
//<mock-runtime-code-change>// Debug.Log("Trigger change for compilation");
}
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1259153f60d44926bab184251760d203
timeCreated: 1697791934
AssetOrigin:
serializedVersion: 1
productId: 239351
packageName: Fast Script Reload
packageVersion: 1.6.1
assetPath: Assets/FastScriptReload/Tests/Runtime/Integration/CodePatterns/NewFieldInitDictionariesWithLocalFunction.cs
uploadId: 710802
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
//no namespace on purpose, easier to access
public static class TestDetourConfirmation
{
public static string MockRuntimeCodeChange = "//<mock-runtime-code-change>//";
private static Dictionary<string, object> ConfirmationEntries { get; } = new Dictionary<string, object>();
public static void Confirm(Type type, string methodName, object confirmationObject)
{
ConfirmationEntries.Add($"{type.FullName}:{methodName}", confirmationObject);
}
public static bool TryGetConfirmationMessage(Type type, string methodName, out object confirmationObject)
{
return ConfirmationEntries.TryGetValue($"{type.FullName}:{methodName}", out confirmationObject);
}
public static bool IsDetourConfirmed(Type type, string methodName, Func<object, bool> compareWithResultPredicate)
{
if (ConfirmationEntries.TryGetValue($"{type.FullName}:{methodName}", out var confirmationObject))
{
return compareWithResultPredicate(confirmationObject);
}
return false;
}
public static void Clear()
{
ConfirmationEntries.Clear();
}
}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4a67ae4254a546f9b23da468eda95242
timeCreated: 1680875585
AssetOrigin:
serializedVersion: 1
productId: 239351
packageName: Fast Script Reload
packageVersion: 1.6.1
assetPath: Assets/FastScriptReload/Tests/Runtime/Integration/CodePatterns/TestDetourConfirmation.cs
uploadId: 710802