Pro3.8.1 can't work on the hololens

hi,
my pro3.8.1 can’t work on the hololens.
unity version 5.6.0f3
build error like below

UnityException: Failed to run serialization weaver with command “Temp\StagingArea\Data\Managed\Pathfinding.JsonFx.dll” -pdb -verbose -unity-engine=“Temp\StagingArea\Data\Managed\UnityEngine.dll” “Temp\StagingArea\TempSerializationWeaver” -lock=UWP\project.lock.json -additionalAssemblyPath=“Temp\StagingArea\Data\Managed” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\ARM” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X86” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X64” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\ARM” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X64” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X86” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X64” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X86” -additionalAssemblyPath=“Temp\StagingArea\Data\Managed\Plugins\X86” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.SocialInfo.SocialInfoContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.DevicesLowLevelContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Printers.PrintersContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.FoundationContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.UniversalApiContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Graphics.Printing3D.Printing3DContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Networking.Connectivity.WwanContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Services.Store.StoreContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.ProfileHardwareTokenContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.ProfileSharedModeContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.ViewManagement.ViewManagementViewScalingContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Activation.ActivatedEventsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Activation.ActivationCameraSettingsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Activation.ContactActivatedEventsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.LockScreenCallContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.FullTrustAppContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Preview.Notes.PreviewNotesContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Resources.Management.ResourceIndexerContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Search.Core.SearchCoreContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Search.SearchContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.StartupTaskContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Wallet.WalletContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Custom.CustomDeviceContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Portable.PortableDeviceContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Printers.Extensions.ExtensionsContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Scanners.ScannerDeviceContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.Sms.LegacySmsApiContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Gaming.Preview.GamesEnumerationContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Management.Deployment.Preview.DeploymentPreviewContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Management.Orchestration.OrchestrationContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Management.Workplace.WorkplaceSettingsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.Capture.AppCaptureContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.Capture.CameraCaptureUIContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.Devices.CallControlContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.MediaControlContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.Playlists.PlaylistsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Media.Protection.ProtectionRenewalContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Networking.Sockets.ControlChannelTriggerContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Perception.Automation.Core.PerceptionAutomationCoreContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Security.EnterpriseData.EnterpriseDataContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Security.ExchangeActiveSyncProvisioning.EasContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Services.Maps.GuidanceContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Services.Maps.LocalSearchContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.SystemManufacturers.SystemManufacturersContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.ProfileRetailInfoContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.UserProfile.UserProfileContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.UserProfile.UserProfileLockScreenContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.ApplicationSettings.ApplicationsSettingsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.Core.AnimationMetrics.AnimationMetricsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.Core.CoreWindowDialogsContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.Xaml.Hosting.HostingContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Web.Http.Diagnostics.HttpDiagnosticsContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.System.SystemManagementContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsPhoneContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract\2.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Devices.SmartCards.SmartCardEmulatorContract\3.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Embedded.DeviceLockdown.DeviceLockdownContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Phone.PhoneContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.Phone.StartScreen.DualSimTileContract\1.0.0.0” -additionalAssemblyPath=“C:\Program Files (x86)\Windows Kits\10\References\Windows.UI.WebUI.Core.WebUICommandBarContract\1.0.0.0”.
Symbols will be read from Temp\StagingArea\Data\Managed\UnityEngine.pdb
No symbols for Temp\StagingArea\Data\Managed\Pathfinding.JsonFx.dll
Weaving assembly E:\ProjectX\Application\Client\Hololens\ILoveNature\Temp\StagingArea\Data\Managed\Pathfinding.JsonFx.dll
Will export symbols of pdb format
Mono.Cecil.ResolutionException: Failed to resolve System.Reflection.BindingFlags
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant)
at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type)
at Mono.Cecil.MetadataBuilder.AddField(FieldDefinition field)
at Mono.Cecil.MetadataBuilder.AddFields(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddTypeDefs()
at Mono.Cecil.MetadataBuilder.BuildTypes()
at Mono.Cecil.MetadataBuilder.BuildModule()
at Mono.Cecil.ModuleWriter.<>c.b__1_0(MetadataBuilder builder, MetadataReader _)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at usw.Weaver.WeaveAssembly(String assemblyPath, AssemblyDefinition unityEngineAssemblyDefinition, ReaderParameters readerParameters)
at usw.Weaver.Weave()
at usw.Program.RunProgram(ConversionOptions options)
at usw.Program.Main(String[] args)

PostProcessWinRT.RunSerializationWeaver () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:500)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:149)
UnityEditor.WSA.BuildPostprocessor.DoPostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:162)

Hi

Version 3.8.8 includes fixes for the hololens platform. You can download the latest update here: https://www.arongranberg.com/astar/download
Make sure that the Pathfinding.Ionic.Zip.dll is marked as being excluded on the Windows Store/Hololens platform.

Best regards,
Aron Granberg

yes, when i upgrade to 3.8.8.1 , compile error was fixed.

but there is another problem.
I deploy the example “recast navmesh1” to hololens, example can’t work correctly.

output log like these:

Some meshes were statically batched. These meshes can not be used for navmesh calculation due to technical constraints.
During runtime scripts cannot access the data of meshes which have been statically batched.
One way to solve this problem is to use cached startup (Save & Load tab in the inspector) to only calculate the graph when the game is not playing.

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

No MeshFilters were found contained in the layers specified by the ‘mask’ variables

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Scanning - Process took 854 ms to complete

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Couldn’t find close nodes to the start point or the end point

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: Couldn’t find close nodes to the start point or the end point
Path Number 1 (unique id)

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Couldn’t find close nodes to the start point or the end point

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: Couldn’t find close nodes to the start point or the end point
Path Number 2 (unique id)

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Couldn’t find close nodes to the start point or the end point

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: Couldn’t find close nodes to the start point or the end point
Path Number 3 (unique id)

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Couldn’t find close nodes to the start point or the end point

If i use cached startup, application will throw a exception like these
Caught exception while deserializing data.
System.NotSupportedException: This operation is not supported.
at System.IO.Compression.DeflateStream.get_Position()
at Pathfinding.Serialization.AstarSerializer.DeserializeNodeReferenceMap()
at Pathfinding.Serialization.AstarSerializer.DeserializeExtraInfo()
at Pathfinding.AstarData.DeserializeGraphsPartAdditive(AstarSerializer sr)
at Pathfinding.AstarData.DeserializeGraphsAdditive(Byte[] bytes)

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

There are no graphs in the scene

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

There are no graphs in the scene

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

There are no graphs in the scene

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

No AstarPath object in the scene or no RecastGraph on that AstarPath object

(Filename: C:/buildslave/unity/build/artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Exception thrown: ‘System.ArgumentNullException’ in Assembly-CSharp.dll
An exception of type ‘System.ArgumentNullException’ occurred in Assembly-CSharp.dll but was not handled in user code
Additional information: Value cannot be null.

I Find the question about why can’t work correctly on hololens.
RecastGenerator.cs
Renderer rend = filter.GetComponent();

				//Workaround for statically batched meshes
				if (rend.isPartOfStaticBatch) {
					containedStatic = true;
				} else {

rend.isPartOfStaticBatch will break the scan.

if we unselected static of gameobject, scan is correct.
but i don’t know why it’s different bewteen editor mode and hololens runtime.
and can we uncomment "if (rend.isPartOfStaticBatch) "?

Hi

That seems like a real bug. It’s odd though because other people have reported it working. You can try to comment that code out as it is just used for error checking. Open the JsonSerializer.cs file and find these lines

if (reader.BaseStream.Position != reader.BaseStream.Length) {
	throw new Exception((reader.BaseStream.Length / 4) + " nodes were serialized, but only data for " + (reader.BaseStream.Position / 4) + " nodes was found. The data looks corrupt.");
}

then comment them out.

That just seems to be that I have configured it incorrectly, my bad. In a standalone built it is not possible to read the vertices of objects that have been marked as ‘static’ therefore it is impossible for my scripts to use them to calculate the navmesh. You can disable the ‘Rasterize Meshes’ toggle and enable the ‘Rasterize Colliders’ toggle instead, that will work regardless of the object is static or not. Or check if the above fix works.