Initial Commit

This commit is contained in:
2025-07-04 20:33:06 +03:00
commit 8f09347ae0
9219 changed files with 2447903 additions and 0 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6ee5311dd1bfe7e4c814e1bb4faf5b02
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,62 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2844263358417267744
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2563431155123992766}
- component: {fileID: 3631170893708523032}
m_Layer: 0
m_Name: OVRVirtualKeyboardBuildingBlock
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2563431155123992766
Transform:
m_ObjectHideFlags: 8
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2844263358417267744}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3631170893708523032
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2844263358417267744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 09cced76cc649e444abf5f01db84a585, type: 3}
m_Name:
m_EditorClassIdentifier:
InitialPosition: 1
textCommitField: {fileID: 0}
leftControllerRootTransform: {fileID: 0}
leftControllerDirectTransform: {fileID: 0}
rightControllerRootTransform: {fileID: 0}
rightControllerDirectTransform: {fileID: 0}
controllerDirectInteraction: 1
controllerRayInteraction: 1
controllerRaycaster: {fileID: 0}
handLeft: {fileID: 0}
handRight: {fileID: 0}
handDirectInteraction: 1
handRayInteraction: 1
handRaycaster: {fileID: 0}
keyboardModelShader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0}
keyboardModelAlphaBlendShader: {fileID: 10750, guid: 0000000000000000f000000000000000,
type: 0}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 425a911bab27f3f4c8a25d35813093f0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5b04b84f2d626fb4c82685d666f3dccf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,91 @@
/*
* 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 System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
namespace Meta.XR.BuildingBlocks.Editor
{
public class VirtualKeyboardBlockData : BlockData
{
protected override List<GameObject> InstallRoutine()
{
var cameraRig = OVRProjectSetupUtils.FindComponentInScene<OVRCameraRig>();
if (cameraRig == null)
{
throw new InvalidOperationException(
"The Virtual Keyboard BB cannot be installed without a camera rig present in the scene.");
}
var virtualKeyboardGo = Instantiate(Prefab, Vector3.zero, Quaternion.identity);
virtualKeyboardGo.name = "[BB] Virtual Keyboard";
var virtualKeyboard = virtualKeyboardGo.GetComponent<OVRVirtualKeyboard>();
if (virtualKeyboard == null)
{
throw new InvalidOperationException(
"The Virtual Keyboard component is missing.");
}
var controllerBBs = Utils.GetBlocksWithType<OVRControllerHelper>();
var leftController = controllerBBs.First(controller => controller.m_controller == OVRInput.Controller.LTouch);
var rightController = controllerBBs.First(controller => controller.m_controller == OVRInput.Controller.RTouch);
var interactorPos = new Vector3(0f, 0f, 0.062f);
var interactorScale = 0.01f * Vector3.one;
var interactorAnchorLeft = new GameObject
{
transform =
{
localPosition = interactorPos,
localScale = interactorScale,
parent = leftController.gameObject.transform,
name = "KeyboardInteractorAnchorLeft"
}
};
var interactorAnchorRight = new GameObject
{
transform =
{
localPosition = interactorPos,
localScale = interactorScale,
parent = rightController.gameObject.transform,
name = "KeyboardInteractorAnchorRight"
}
};
virtualKeyboard.leftControllerRootTransform = cameraRig.leftControllerAnchor;
virtualKeyboard.rightControllerRootTransform = cameraRig.rightControllerAnchor;
virtualKeyboard.leftControllerDirectTransform = interactorAnchorLeft.transform;
virtualKeyboard.rightControllerDirectTransform = interactorAnchorRight.transform;
var handBBs = Utils.GetBlocksWithType<OVRHand>();
var leftHand = handBBs.First(hand => hand.HandType == OVRHand.Hand.HandLeft);
var rightHand = handBBs.First(hand => hand.HandType == OVRHand.Hand.HandRight);
virtualKeyboard.handLeft = leftHand;
virtualKeyboard.handRight = rightHand;
return new List<GameObject> { virtualKeyboardGo };
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e75160a1bbe3a6945aac30180acc8570
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b0ef9ada34bf36247818a65bb47d8e22
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 15e1416ddcf591f488b000099283e5b4
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:
@@ -0,0 +1,30 @@
%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: e75160a1bbe3a6945aac30180acc8570, type: 3}
m_Name: VirtualKeyboard
m_EditorClassIdentifier:
id: bac08eda-400f-4f61-8842-77e7699e068d
version: 1
blockName: Virtual Keyboard
description: Adds a virtual keyboard to your scene
sdk: 0
thumbnail: {fileID: 2800000, guid: 15e1416ddcf591f488b000099283e5b4, type: 3}
displayOnContentTab: 1
experimental: 0
order: -3
prefab: {fileID: 2844263358417267744, guid: 425a911bab27f3f4c8a25d35813093f0, type: 3}
dependencies:
- e47682b9-c270-40b1-b16d-90b627a5ce1b
- 5817f7c0-f2a5-45f9-a5ca-64264e0166e8
- 8b26b298-7bf4-490e-b245-a039c0184303
isSingleton: 1
usageInstructions:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fe0c063c723674346a0135da9fb6c5ce
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: