Skip to content
New issue

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

AddDllDirectory fails when dlls/c# files are placed in a unity package compared to in the project Assets folder #24

Open
chrisfromwork opened this issue May 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@chrisfromwork
Copy link

@dfields-msft

We should do a more robust search to try and locate dlls in a unity package folder. Right now it appears we only look for dlls in the Unity project's assets folder.

if (AddDllDirectory(dllDirectory) == 0)

This causes dlls to fail to load when they are available to the project. This change will be needed if VCRTFowarders is distributed through a unity package.

@dfields-msft
Copy link
Contributor

@chrisfromwork can you give examples of other valid locations that package binaries could be placed in a project besides the Assets folder, while avoiding false-positives from internal cache directories, etc? Where would they naturally end up if they were delivered via a Unity package rather than NuGet?

@chrisfromwork
Copy link
Author

I'm not a hundred percent sure what additional unity folder paths will need to be iterated over here. I do know that calls to TryFindAssetPath seem to look both in asset and unity package folders. The following worked for locating Azure Spatial Anchors resources in unity packages:

https://github.com/Azure/azure-spatial-anchors-samples/blob/181599165f19c8215a4e7491f56758acc70d9301/Unity/Assets/AzureSpatialAnchors.SDK/Editor/SpatialAnchorsUnityBuildProcessing.cs#L31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants