Can't import Unity.Netcode.TestHelpers.Runtime
See original GitHub issueDescription
Hi, I’m trying to use the NetcodeIntegrationTest
class, which is in the Unity.Netcode.TestHelpers.Runtime
namespace. When I try to import the namespace, I get an error that TestHelpers
does not exist in the Unity.Netcode
namespace.
I referenced the com.unity.netcode.testhelpers.runtime
assembly in my .asmdef
Reproduce Steps
- Create an Assembly Definition Asset
- Add the reference
com.unity.netcode.testhelpers.runtime
- Create a script in the same directory
- Try to import Unity.Netcode.TestHelpers.Runtime
Actual Outcome
The namespace cannot be imported because the reference is not present in the project references
Expected Outcome
The namespace can be imported and the reference is present in the project references
Screenshots
Environment
- OS: Windows 10
- Unity Version: 2022.1.23f1
- Netcode Version: 1.4.0 (same result on 1.1)
- Netcode Commit: Not sure. Installed from Unity Package Manager.
Additional Context
The .cs files are visible in Library\PackageCache\com.unity.netcode.gameobjects@1.4.0\TestHelpers\Runtime
, but Unity never builds a .dll and puts it in Library/ScriptAssemblies
Issue Analytics
- State:
- Created 5 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can't import Unity.Netcode.TestHelpers.Runtime
Hi, I'm trying to use the NetcodeIntegrationTest class, which is in the Unity.Netcode.TestHelpers.Runtime namespace. When I try to import ...
Read more >Namespace Unity.Netcode.TestHelpers.Runtime
Derive from this class to create your own conditional handling for your NetcodeIntegrationTest integration tests when dealing with more ...
Read more >Troubleshooting - Unity's Package Manager
If your network can't reach the package registry server, it's probably because there is a connection problem with the network.
Read more >COMPLETE Unity Multiplayer Tutorial (Netcode for ... - YouTube
You can do what I did and right click your Assets folder in the Project tab and click Create -> Netcode (was at...
Read more >Class NetcodeIntegrationTest | Netcode for GameObjects
Registers the CanClientsLoad and CanClientsUnload events of the ClientSceneHandler. The default is: Unity.Netcode.TestHelpers.Runtime.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Maclay74 @KenjiTakahashi-Rial As a side note, I wasn’t 100% correct and there is a way to use just the package and expose testables.
Sorry for not including this option, but as an alternate way you can add a “testables” entry to your manifest file just after the dependencies section:
This should also work when using the NGO package (and not have to point to the release branch).
@ShadauxCat @NoelStephensUnity thanks for the explanation and the example!