Initial Commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e88f5cfa5b45c0f4ea71fe36773d52a2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+2957
File diff suppressed because it is too large
Load Diff
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81b0c6f02d961984eb074b9834c049ae
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+2957
File diff suppressed because it is too large
Load Diff
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 392af43851d822242be5b1ae72b35b46
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37d7bc76f4a1d9d4ca630b3a36e14649
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||
* you may not use the Oculus SDK except in compliance with the License,
|
||||
* which is provided at the time of installation or download, or which
|
||||
* otherwise accompanies this software in either electronic or hard copy form.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://developer.oculus.com/licenses/oculussdk/
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
using Oculus.Interaction.Input;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Meta.XR.BuildingBlocks.Editor;
|
||||
|
||||
namespace Oculus.Interaction.Editor.BuildingBlocks
|
||||
{
|
||||
public class OVRSyntheticHandsBlockData : BlockData
|
||||
{
|
||||
public string _handsBlockId;
|
||||
public string _uOIAssetsHandsBlockId;
|
||||
public GameObject _leftHand;
|
||||
public GameObject _rightHand;
|
||||
|
||||
protected override List<GameObject> InstallRoutine()
|
||||
{
|
||||
var syntheticHands = new List<GameObject>();
|
||||
foreach (var hand in BlocksUtils.GetHands(_handsBlockId))
|
||||
{
|
||||
var syntheticHand = InstantiateHand(hand);
|
||||
syntheticHands.Add(syntheticHand);
|
||||
}
|
||||
|
||||
DisableUOIAssetsHandVisual();
|
||||
|
||||
return syntheticHands;
|
||||
}
|
||||
|
||||
private GameObject InstantiateHand(Hand hand)
|
||||
{
|
||||
var handedness = hand.Handedness;
|
||||
var prefab = handedness == Handedness.Left ? _leftHand : _rightHand;
|
||||
var syntheticHand = Instantiate(prefab, hand.transform, false);
|
||||
syntheticHand.GetComponent<SyntheticHand>().InjectModifyDataFromSource(hand);
|
||||
syntheticHand.SetActive(true);
|
||||
syntheticHand.name = $"[BB] Synthetic {handedness} Hand";
|
||||
BlocksUtils.UpdateForAutoWiring(syntheticHand);
|
||||
return syntheticHand;
|
||||
}
|
||||
|
||||
private void DisableUOIAssetsHandVisual()
|
||||
{
|
||||
var handsBlocks = Meta.XR.BuildingBlocks.Editor.Utils.GetBlocks(_uOIAssetsHandsBlockId);
|
||||
foreach (var hand in handsBlocks)
|
||||
{
|
||||
var skeletonRenderer = hand.GetComponent<OVRSkeletonRenderer>();
|
||||
var meshRenderer = hand.GetComponent<OVRMeshRenderer>();
|
||||
var skinnedMeshRenderer = hand.GetComponent<SkinnedMeshRenderer>();
|
||||
if (skeletonRenderer && skeletonRenderer.enabled) skeletonRenderer.enabled = false;
|
||||
if (meshRenderer && meshRenderer.enabled) meshRenderer.enabled = false;
|
||||
if (skinnedMeshRenderer && skinnedMeshRenderer.enabled) skinnedMeshRenderer.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fb198b2fc4bbcb4999ac10ef4f0ad3b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3fb198b2fc4bbcb4999ac10ef4f0ad3b, type: 3}
|
||||
m_Name: Synthetic Hands
|
||||
m_EditorClassIdentifier:
|
||||
id: 6b67162c-2460-4766-a931-980388647573
|
||||
version: 1
|
||||
blockName: Synthetic Hands
|
||||
description: Adds synthetic hands
|
||||
sdk: 0
|
||||
thumbnail: {fileID: 2800000, guid: 876b2885201ff5e46876cfe9ea588452, type: 3}
|
||||
displayOnContentTab: 1
|
||||
experimental: 1
|
||||
order: 0
|
||||
prefab: {fileID: 6128136802436501766, guid: 81b0c6f02d961984eb074b9834c049ae, type: 3}
|
||||
dependencies:
|
||||
- 0393ca30-f2a9-4865-a40f-f9a68d01c3a9
|
||||
isSingleton: 1
|
||||
_handsBlockId: 0393ca30-f2a9-4865-a40f-f9a68d01c3a9
|
||||
_uOIAssetsHandsBlockId: 8b26b298-7bf4-490e-b245-a039c0184303
|
||||
_leftHand: {fileID: 6128136802436501766, guid: 81b0c6f02d961984eb074b9834c049ae,
|
||||
type: 3}
|
||||
_rightHand: {fileID: 4655985016907794440, guid: 392af43851d822242be5b1ae72b35b46,
|
||||
type: 3}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e4a3f91312cbb042a301e514935092f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abc06eb0aada56e4f98fee84f3377b53
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 413 KiB |
+135
@@ -0,0 +1,135 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 876b2885201ff5e46876cfe9ea588452
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user