C# code:
/*/ role classLibrary; outputPath %folders.ThisApp%\Libraries; /*/
namespace TestNS;
/// <summary>
/// Do some stuff, nothing important
/// /// </summary>
public static class TestLib {
/// <summary>
/// Do something
///
/// </summary>
public static void PrintSomething() {
print.it("Something");
}
}
I compiled that... Then created a script that references:
C# code:
/*/ r Libraries\TestLib.dll; /*/
using static TestNS.TestLib;
PrintSomething();
Then I went back and added another static method to the class:
C# code:
// class "TestLib.cs" /*/ role classLibrary; outputPath %folders.ThisApp%\Libraries; /*/
namespace TestNS;
/// <summary>
/// Do some stuff, nothing important
/// /// </summary>
public static class TestLib {
/// <summary>
/// Do something
///
/// </summary>
public static void PrintSomething() {
print.it("Something");
}
public static void PrintSomethingElse() {
print.it("Something Else");
}
}
... recompiled and tried to reference in the script:
C# code:
// script "" /*/ r Libraries\TestLib.dll; /*/
using static TestNS.TestLib;
PrintSomething();
PrintSomethingElse();
Then I get the red squiggly under the PrintSomethingElse call and get a compile error stating:
Compilation: 1 errors
<open "<0x1000000AB>|6|1">Script5.cs(6,1): error CS0103: The name 'PrintSomethingElse' does not exist in the current context
Same thing seems to happen if I modify the type parameters or return type of a method... In some cases even changing code. Not sure what is happening there. I can try on another machine. It's just odd.
I was able to change some stuff inside the method and it worked... after restarting the editor, I ran the same script and got the "something else" output...
changed the print.it line to ("I dont want to"), recompiled and I got expected output. It seems maybe more to do with adding/changing methods in a class?