We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's my test: Partial classes:
// TestClass1.1.cs using TeamHalfBeard.Core; using UnityEngine.InputSystem; namespace TestNamespace { [Service(typeof(TestClass1))] public partial class TestClass1 : IUpdatable { public void Update(float deltaTime) { if (Keyboard.current.kKey.wasPressedThisFrame) { LogMessage("kek"); } } } } // TestClass1.2.cs using UnityEngine; namespace TestNamespace { public partial class TestClass1 { private void LogMessage(string message) { Debug.Log($"{GetType().Name}.{message}"); } } }
Partial classes (result):
using TeamHalfBeard.Core; using UnityEngine.InputSystem; using UnityEngine; [assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Assembly-CSharp")] [Service(typeof(TestClass1))] public partial class TestClass1__Patched_:IUpdatable { public void Update(float deltaTime) { if (Keyboard.current.kKey.wasPressedThisFrame) { LogMessage("lol"); } } private void LogMessage(string message) { Debug.Log($"{GetType().Name}.{message}"); } private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldNameToInitialValueFn = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldsToGetTypeFnDictionaryFieldName = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; }
Normal class:
// TestClass2.cs using TeamHalfBeard.Core; using UnityEngine; using UnityEngine.InputSystem; namespace TestNamespace { [Service(typeof(TestClass2))] public class TestClass2 : IUpdatable { public void Update(float deltaTime) { if (Keyboard.current.kKey.wasPressedThisFrame) { LogMessage("lol"); } } private void LogMessage(string message) { Debug.Log($"{GetType().Name}.{message}"); } } }
Normal class (result):
using TeamHalfBeard.Core; using UnityEngine; using UnityEngine.InputSystem; namespace TestNamespace { [Service(typeof(TestClass2))] public class TestClass2__Patched_: IUpdatable { public void Update(float deltaTime) { if (Keyboard.current.kKey.wasPressedThisFrame) { LogMessage("lol"); } } private void LogMessage(string message) { Debug.Log($"{GetType().Name}.{message}"); } private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldNameToInitialValueFn = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldsToGetTypeFnDictionaryFieldName = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; } }
Diff:
using TeamHalfBeard.Core; using UnityEngine.InputSystem; using UnityEngine; + namespace TestNamespace { -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Assembly-CSharp")] [Service(typeof(TestClass1))] public partial class TestClass1__Patched_:IUpdatable { public void Update(float deltaTime) { if (Keyboard.current.kKey.wasPressedThisFrame) { LogMessage("lol"); } } private void LogMessage(string message) { Debug.Log($"{GetType().Name}.{message}"); } private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldNameToInitialValueFn = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; private static global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> __Patched_NewFieldsToGetTypeFnDictionaryFieldName = new global::System.Collections.Generic.Dictionary<string, global::System.Func<object>> { }; } +}
The text was updated successfully, but these errors were encountered:
feat: supporting namespaces in partial classes
da55868
Fixes handzlikchris#137
Successfully merging a pull request may close this issue.
Here's my test:
Partial classes:
Partial classes (result):
Normal class:
Normal class (result):
Diff:
The text was updated successfully, but these errors were encountered: