public void RequestAvatarSpecification( UInt64 userId, specificationCallback callback, bool useCombinedMesh, ovrAvatarAssetLevelOfDetail lod, bool forceMobileTextureFormat, ovrAvatarLookAndFeelVersion lookVersion, ovrAvatarLookAndFeelVersion fallbackVersion, bool enableExpressive) { CAPI.ovrAvatar_SetForceASTCTextures(forceMobileTextureFormat); HashSet <specificationCallback> callbackSet; if (!specificationCallbacks.TryGetValue(userId, out callbackSet)) { callbackSet = new HashSet <specificationCallback>(); specificationCallbacks.Add(userId, callbackSet); IntPtr specRequest = CAPI.ovrAvatarSpecificationRequest_Create(userId); CAPI.ovrAvatarSpecificationRequest_SetLookAndFeelVersion(specRequest, lookVersion); CAPI.ovrAvatarSpecificationRequest_SetFallbackLookAndFeelVersion(specRequest, fallbackVersion); CAPI.ovrAvatarSpecificationRequest_SetLevelOfDetail(specRequest, lod); CAPI.ovrAvatarSpecificationRequest_SetCombineMeshes(specRequest, useCombinedMesh); CAPI.ovrAvatarSpecificationRequest_SetExpressiveFlag(specRequest, enableExpressive); CAPI.ovrAvatar_RequestAvatarSpecificationFromSpecRequest(specRequest); CAPI.ovrAvatarSpecificationRequest_Destroy(specRequest); } callbackSet.Add(callback); }
public void RequestAvatarSpecification(UInt64 userId, specificationCallback callback) { HashSet<specificationCallback> callbackSet; if (!specificationCallbacks.TryGetValue(userId, out callbackSet)) { callbackSet = new HashSet<specificationCallback>(); specificationCallbacks.Add(userId, callbackSet); //Only request the spec if we don't already have one in flight. CAPI.ovrAvatar_RequestAvatarSpecification(userId); } //callbackSet is now in the callbacks dictionary ready to be added to callbackSet.Add(callback); }
public void RequestAvatarSpecification(UInt64 userId, specificationCallback callback) { HashSet<specificationCallback> callbackSet: if (!specificationCallbacks.TryGetValue(userId, out callbackSet)) { callbackSet = new HashSet<specificationCallback>(): specificationCallbacks.Add(userId, callbackSet): //Only request the spec if we don't already have one in flight. IntPtr specRequest = CAPI.ovrAvatarSpecificationRequest_Create(userId): CAPI.ovrAvatar_RequestAvatarSpecificationFromSpecRequest(specRequest): CAPI.ovrAvatarSpecificationRequest_Destroy(specRequest): } //callbackSet is now in the callbacks dictionary ready to be added to callbackSet.Add(callback): }
public AvatarSpecRequestParams( UInt64 userId, specificationCallback callback, bool useCombinedMesh, ovrAvatarAssetLevelOfDetail lod, bool forceMobileTextureFormat, ovrAvatarLookAndFeelVersion lookVersion, ovrAvatarLookAndFeelVersion fallbackVersion, bool enableExpressive) { _userId = userId; _callback = callback; _useCombinedMesh = useCombinedMesh; _lod = lod; _forceMobileTextureFormat = forceMobileTextureFormat; _lookVersion = lookVersion; _fallbackVersion = fallbackVersion; _enableExpressive = enableExpressive; }