上传修改
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0933a1d722036614f9a29c2ceb912c55
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,221 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Yomov;
|
||||
using System.Collections.Concurrent;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
public class BridgeClientSample : MonoBehaviour, BridgeClient.IContentSyncHandler
|
||||
{
|
||||
[SerializeField]
|
||||
private BridgeClient _client;
|
||||
private object _lock = new object();
|
||||
|
||||
|
||||
public long contentID = 1;
|
||||
public string contentName = "content1";
|
||||
public long teamOriginID = 1;
|
||||
public string teamName = "team1";
|
||||
public long playerOriginID = 1;
|
||||
public string playerNick = "player1";
|
||||
|
||||
private SyncContentData syncContentData;
|
||||
private ConcurrentDictionary<string, SyncTeamData> _teamDataDic = new ();
|
||||
private ConcurrentDictionary<string, SyncPlayerData> _playerDataDic = new ();
|
||||
private List<string> _teamPlayerDic = new();
|
||||
|
||||
void Start()
|
||||
{
|
||||
if(CommandLineArgs.JsonData == null){
|
||||
Debug.LogError("Json数据为空");
|
||||
CommandLineParser.LoadCommandLineArgsData();
|
||||
}
|
||||
|
||||
// 初始化BridgeClient
|
||||
if (_client == null)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (_client == null)
|
||||
{
|
||||
_client = BridgeClient.Instance;
|
||||
_client.ContentSyncHandler = this;
|
||||
// 这里可以设置默认的桥接服务器地址和端口
|
||||
_client.Connect(CommandLineArgs.JsonData.bridgeServerIP, CommandLineArgs.JsonData.bridgeServerPort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contentID = CommandLineArgs.contentID;
|
||||
contentName = CommandLineArgs.contentName;
|
||||
teamOriginID = CommandLineArgs.teamOriginID;
|
||||
teamName = CommandLineArgs.teamName;
|
||||
playerOriginID = CommandLineArgs.playerOriginID;
|
||||
playerNick = CommandLineArgs.playerNick;
|
||||
|
||||
InitSyncData();
|
||||
|
||||
_ = SyncData();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化同步数据
|
||||
/// </summary>
|
||||
private void InitSyncData(){
|
||||
//创建同步数据
|
||||
if (syncContentData == default && contentID != default && !string.IsNullOrEmpty(contentName))
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (syncContentData == default)
|
||||
{
|
||||
syncContentData = new SyncContentData()
|
||||
{
|
||||
ID = contentID.ToString(),
|
||||
ContentName = contentName,
|
||||
JsonData = "{}"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//创建队伍数据
|
||||
if (syncContentData != default && teamOriginID != default && !string.IsNullOrEmpty(teamName))
|
||||
{
|
||||
if (syncContentData.Teams.FindIndex((team) => team.ID == teamOriginID.ToString()) == -1)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
var syncTeamData = new SyncTeamData()
|
||||
{
|
||||
ID = teamOriginID.ToString(),
|
||||
TeamName = teamName,
|
||||
ContentID = contentID.ToString(),
|
||||
JsonData = "{}",
|
||||
Players = { },
|
||||
CurArea = "",
|
||||
CurStage = "",
|
||||
SpanTime = 0,
|
||||
};
|
||||
syncContentData.Teams.Add(syncTeamData);
|
||||
_teamDataDic.TryAdd(teamOriginID.ToString(),syncTeamData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//创建玩家数据
|
||||
if (_teamDataDic.TryGetValue(teamOriginID.ToString(),out var teamData) && playerOriginID != default)
|
||||
{
|
||||
if (teamData.Players.FindIndex((player) => player.ID == playerOriginID.ToString()) == -1)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
var syncPlayerData = new SyncPlayerData()
|
||||
{
|
||||
ID = playerOriginID.ToString(),
|
||||
PlayerNick = playerNick,
|
||||
TeamName = teamData.TeamName,
|
||||
ContentID = contentID.ToString(),
|
||||
JsonData = "{}",
|
||||
Pos = new FVector3(),
|
||||
Rotation = new FVector4(),
|
||||
PrefabName = "",
|
||||
};
|
||||
teamData.Players.Add(syncPlayerData);
|
||||
_playerDataDic.TryAdd(playerOriginID.ToString(),syncPlayerData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_teamPlayerDic.Add(playerOriginID.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
async UniTask SyncData()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (syncContentData != default&&syncContentData.Teams.Count>0)
|
||||
{
|
||||
//修改时间
|
||||
foreach (var teamData in syncContentData.Teams)
|
||||
{
|
||||
teamData.SpanTime += 100;
|
||||
foreach (var playerData in teamData.Players)
|
||||
{
|
||||
playerData.JsonData = JsonTool.SerializeObject(playerData.PlayerJsonData);
|
||||
}
|
||||
}
|
||||
|
||||
_client.SendData(500, syncContentData); // 通过接口调用
|
||||
}
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(100));
|
||||
gameObject.GetCancellationTokenOnDestroy().ThrowIfCancellationRequested();
|
||||
}
|
||||
}
|
||||
|
||||
#region BridgeClient.IContentSyncHandler 实现
|
||||
|
||||
/// <summary>
|
||||
/// 同步内容数据
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public void HandleSyncContentData(SyncContentData data)
|
||||
{
|
||||
// 处理同步内容数据的逻辑
|
||||
ReceiveSyncContentData(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步播控指令
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public void HandleSyncContentControlData(SyncContentControlData data)
|
||||
{
|
||||
// 处理同步播控指令的逻辑
|
||||
Debug.Log($"YomovOpenManager 收到同步播控指令: {data.cmd}");
|
||||
ReceiveSyncCommand(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 同步内容数据
|
||||
/// </summary>
|
||||
/// <param name="syncData"></param>
|
||||
public void ReceiveSyncContentData(SyncContentData syncData)
|
||||
{
|
||||
long.TryParse(syncData.ID, out var contentId);
|
||||
|
||||
//如果playerObjectDic中没有玩家信息,则创建玩家信息,并添加到playerObjectDic。有则更新玩家信息
|
||||
foreach (var teamData in syncData.Teams)
|
||||
{
|
||||
long.TryParse(teamData.ID, out var teamId);
|
||||
foreach (var playerData in teamData.Players)
|
||||
{
|
||||
Debug.Log($"创建玩家{playerData.ID} 内容{contentId} 队伍{teamId}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 接收桥接服务器播控指令
|
||||
/// </summary>
|
||||
public void ReceiveSyncCommand(SyncContentControlData controlData)
|
||||
{
|
||||
int cmd = controlData.cmd;
|
||||
Debug.Log($"ReceiveSyncCommand: {cmd}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e73b60e567a12014e94579015faf1660
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,385 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &98841359
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 98841361}
|
||||
- component: {fileID: 98841360}
|
||||
m_Layer: 0
|
||||
m_Name: BridgeClientSample
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &98841360
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 98841359}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1d9ba4c8839aa904aaf3858fd57b835e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &98841361
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 98841359}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 14.396261, y: 1.1403027, z: 4.0924015}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &252990281
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 252990284}
|
||||
- component: {fileID: 252990283}
|
||||
- component: {fileID: 252990282}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &252990282
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 252990281}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &252990283
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 252990281}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &252990284
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 252990281}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &334472948
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 334472950}
|
||||
- component: {fileID: 334472949}
|
||||
- component: {fileID: 334472951}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &334472949
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 334472948}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &334472950
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 334472948}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!114 &334472951
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 334472948}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_LightLayerMask: 1
|
||||
m_RenderingLayers: 1
|
||||
m_CustomShadowLayers: 0
|
||||
m_ShadowLayerMask: 1
|
||||
m_ShadowRenderingLayers: 1
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
m_SoftShadowQuality: 0
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 252990284}
|
||||
- {fileID: 334472950}
|
||||
- {fileID: 98841361}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52684b5b2df8b2146b4e0bd56f231bde
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,7 +9,7 @@ public class PXR_PicoHandPinchGesture : PicoHandDeviceDoEvent
|
||||
|
||||
public bool AimRayTouched { get => aimRayTouched; set => aimRayTouched = value; }
|
||||
private bool pinch = false;
|
||||
private HandAimState aimState = new HandAimState();
|
||||
//private HandAimState aimState = new HandAimState();
|
||||
public float PinchStrength { get; private set; }
|
||||
|
||||
public bool Pinch
|
||||
|
||||
@@ -7,14 +7,15 @@ using UnityEngine.InputSystem.LowLevel;
|
||||
|
||||
public class PicoHandDeviceDoEvent : MonoBehaviour
|
||||
{
|
||||
public HandType handType;
|
||||
//public HandType handType;
|
||||
CustomPicoHandDevice controller;
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
{
|
||||
string hand_name = handType == HandType.HandLeft ? "LeftHand" : "RightHand";
|
||||
controller = InputSystem.AddDevice<CustomPicoHandDevice>();
|
||||
InputSystem.SetDeviceUsage(controller, hand_name);
|
||||
//Sora: 注释
|
||||
// string hand_name = handType == HandType.HandLeft ? "LeftHand" : "RightHand";
|
||||
// controller = InputSystem.AddDevice<CustomPicoHandDevice>();
|
||||
// InputSystem.SetDeviceUsage(controller, hand_name);
|
||||
}
|
||||
|
||||
public void GripOn()
|
||||
|
||||
@@ -385,7 +385,6 @@ MonoBehaviour:
|
||||
- {fileID: 4886579266858725072}
|
||||
- {fileID: 1947857273447356982}
|
||||
- {fileID: 6748252353675664983}
|
||||
- {fileID: -3862948770116378203}
|
||||
- {fileID: -3144088408467511901}
|
||||
- {fileID: -8370582489686379827}
|
||||
- {fileID: -6163642510492887241}
|
||||
@@ -397,21 +396,6 @@ MonoBehaviour:
|
||||
- {fileID: -3626592596563777255}
|
||||
- {fileID: -9001553613417982913}
|
||||
- {fileID: -2837966497115553115}
|
||||
- {fileID: -7915705017878677564}
|
||||
- {fileID: -8227909829351757296}
|
||||
- {fileID: 5090575967443000919}
|
||||
- {fileID: -6538237223961248157}
|
||||
- {fileID: 2840288595395014014}
|
||||
- {fileID: -5942627411524357730}
|
||||
- {fileID: 1459529590198845171}
|
||||
- {fileID: -2037363873624342323}
|
||||
- {fileID: -8874164459373168029}
|
||||
- {fileID: -4345512606885018779}
|
||||
- {fileID: -6657182708639237267}
|
||||
- {fileID: 898593478752495218}
|
||||
- {fileID: -4308497273053087666}
|
||||
- {fileID: -4692979338200063124}
|
||||
- {fileID: -7649256315862371926}
|
||||
- {fileID: 5145860401816555812}
|
||||
- {fileID: -901757332110008549}
|
||||
- {fileID: -811069660425830737}
|
||||
@@ -1947,33 +1931,6 @@ MonoBehaviour:
|
||||
- {fileID: 1900466939719037466}
|
||||
- {fileID: 8467581085975437764}
|
||||
- {fileID: 5986685163217705120}
|
||||
- {fileID: 6592265262943011212}
|
||||
- {fileID: 1457435792888789070}
|
||||
- {fileID: -4066637016903865673}
|
||||
- {fileID: 5705687577446329549}
|
||||
- {fileID: 8095054099464962946}
|
||||
- {fileID: -3542796066081146479}
|
||||
- {fileID: -1449767880782111679}
|
||||
- {fileID: 1844387543086744982}
|
||||
- {fileID: -859410706242512340}
|
||||
- {fileID: 7048586510007016870}
|
||||
- {fileID: -7970441663027049484}
|
||||
- {fileID: 614959474527606702}
|
||||
- {fileID: -3607867408892199536}
|
||||
- {fileID: 2093617178721440109}
|
||||
- {fileID: -2540339724445198131}
|
||||
- {fileID: -3934909474993365203}
|
||||
- {fileID: -4284113504029683563}
|
||||
- {fileID: 1747555620847006103}
|
||||
- {fileID: 2823038090036502561}
|
||||
- {fileID: -1743979283492068913}
|
||||
- {fileID: -3190808923116265120}
|
||||
- {fileID: -1593039946983165509}
|
||||
- {fileID: 4820737547453869646}
|
||||
- {fileID: -5391827792574972510}
|
||||
- {fileID: 8579111976565847516}
|
||||
- {fileID: 8831824165484684165}
|
||||
- {fileID: -7207801046737811532}
|
||||
- {fileID: -2376319167279728484}
|
||||
- {fileID: -27139488243504222}
|
||||
- {fileID: 3421935642226636747}
|
||||
|
||||
@@ -12,8 +12,8 @@ public class PicoAPI : MonoBehaviour
|
||||
if (_Instance == null)
|
||||
_Instance = this;
|
||||
|
||||
PXR_Enterprise.InitEnterpriseService();
|
||||
PXR_Enterprise.BindEnterpriseService();
|
||||
// PXR_Enterprise.InitEnterpriseService();
|
||||
// PXR_Enterprise.BindEnterpriseService();
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
@@ -21,7 +21,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得WakeLock锁
|
||||
/// <EFBFBD><EFBFBD><EFBFBD>WakeLock<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void AcquireWakeLock()
|
||||
{
|
||||
@@ -29,16 +29,16 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校正视角
|
||||
/// У<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD>
|
||||
/// </summary>
|
||||
public void TryRecenter()
|
||||
{
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.Head).subsystem.TryRecenter();//校正视角
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.Head).subsystem.TryRecenter();//У<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD>
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 开启投屏
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenTouPing()
|
||||
{
|
||||
@@ -51,7 +51,7 @@ public class PicoAPI : MonoBehaviour
|
||||
PXR_Enterprise.StartActivity(pkgName, "", "", "", new string[] { }, new int[] { });
|
||||
}
|
||||
/// <summary>
|
||||
/// 开启wifi
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>wifi
|
||||
/// </summary>
|
||||
public void OpenWIFI()
|
||||
{
|
||||
@@ -60,7 +60,7 @@ public class PicoAPI : MonoBehaviour
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 开启pico播放器
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>pico<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void PlayPicoVideo(string fileName)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class PicoAPI : MonoBehaviour
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 保持应用程序活跃
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ
|
||||
/// </summary>
|
||||
public void AppKeepAlive(string appPackageName)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置应用作为启动程序
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void SetAppAsHome(string pkgName)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置USB配置模式为MTP
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>USB<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽΪMTP
|
||||
/// </summary>
|
||||
public void SetUSBConfigMode()
|
||||
{
|
||||
@@ -95,14 +95,14 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 强制退出应用
|
||||
/// ǿ<EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>Ӧ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void KillAppsByPidOrPackageName(string pkgName)
|
||||
{
|
||||
PXR_Enterprise.KillAppsByPidOrPackageName(new int[] { }, new string[] { pkgName });
|
||||
}
|
||||
/// <summary>
|
||||
/// 清除后台应用白名单
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨Ӧ<EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void KillBackgroundAppsWithWhiteList(string pkgName)
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置瞳距
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͫ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void SetIpd(float ipd)
|
||||
{
|
||||
@@ -119,18 +119,18 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string installCode = code switch
|
||||
{
|
||||
1 => "失败",
|
||||
2 => "不在有效范围",
|
||||
_ => "成功",
|
||||
1 => "ʧ<EFBFBD><EFBFBD>",
|
||||
2 => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>Χ",
|
||||
_ => "<EFBFBD>ɹ<EFBFBD>",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#region 打开关闭重启软件
|
||||
#region <EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 通过包名调用其他软件
|
||||
/// ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
/// <param name="pkgName">应用包名</param>
|
||||
/// <param name="pkgName">Ӧ<EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD></param>
|
||||
/// <param name="activity">AndroidJavaObject</param>
|
||||
public void OpenPackage(string pkgName, AndroidJavaObject activity = null)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("未安装此软件:" + pkgName);
|
||||
Debug.Log("δ<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" + pkgName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否安装了此app
|
||||
/// <EFBFBD>Ƿ<EFBFBD>װ<EFBFBD>˴<EFBFBD>app
|
||||
/// </summary>
|
||||
public bool IsAppInstalled(string packageName)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取apk包名
|
||||
/// <EFBFBD><EFBFBD>ȡapk<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string GetPackageNameFromApk(string apkFilePath)
|
||||
{
|
||||
@@ -208,9 +208,9 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
|
||||
#region 关闭安全边界
|
||||
#region <EFBFBD>رհ<EFBFBD>ȫ<EFBFBD>߽<EFBFBD>
|
||||
/// <summary>
|
||||
/// 关闭边界
|
||||
/// <EFBFBD>رձ߽<EFBFBD>
|
||||
/// </summary>
|
||||
public void OffBoundary()
|
||||
{
|
||||
@@ -220,21 +220,21 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
|
||||
#region 设置手柄震动
|
||||
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 设置手柄震动
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
/// <param name="vibrateType">手柄</param>
|
||||
/// <param name="amplitude">振幅</param>
|
||||
/// <param name="duration">持续时间</param>
|
||||
/// <param name="frequency">震动频率</param>
|
||||
public void SetControllerVibration(PXR_Input.VibrateType vibrateType, float amplitude, int duration, int frequency = 150)
|
||||
{
|
||||
PXR_Input.SendHapticImpulse(vibrateType, amplitude, duration, frequency);
|
||||
}
|
||||
/// <param name="vibrateType"><EFBFBD>ֱ<EFBFBD></param>
|
||||
/// <param name="amplitude"><EFBFBD><EFBFBD><EFBFBD></param>
|
||||
/// <param name="duration"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD></param>
|
||||
/// <param name="frequency"><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD></param>
|
||||
// public void SetControllerVibration(PXR_Input.VibrateType vibrateType, float amplitude, int duration, int frequency = 150)
|
||||
// {
|
||||
// PXR_Input.SendHapticImpulse(vibrateType, amplitude, duration, frequency);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 获得手柄电量 0是左手柄,1是右手柄
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int[] GetControllerBattery()
|
||||
@@ -244,9 +244,9 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
|
||||
#region 静默安装/卸载apk
|
||||
#region <EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>װ/ж<EFBFBD><EFBFBD>apk
|
||||
/// <summary>
|
||||
/// 静默安装apk
|
||||
/// <EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>װapk
|
||||
/// </summary>
|
||||
public void InstallApk(string path)
|
||||
{
|
||||
@@ -259,15 +259,15 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string installCode = code switch
|
||||
{
|
||||
1 => "失败",
|
||||
2 => "无此操作权限",
|
||||
_ => "成功",
|
||||
1 => "ʧ<EFBFBD><EFBFBD>",
|
||||
2 => "<EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>",
|
||||
_ => "<EFBFBD>ɹ<EFBFBD>",
|
||||
};
|
||||
Debug.Log($"静默安装apk的路径: {path}, code: {installCode}");
|
||||
Debug.Log($"<EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>װapk<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>: {path}, code: {installCode}");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 静默卸载app
|
||||
/// <EFBFBD><EFBFBD>Ĭж<EFBFBD><EFBFBD>app
|
||||
/// </summary>
|
||||
public void UnInstallApp(string appPackageName)
|
||||
{
|
||||
@@ -276,62 +276,62 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string unInstallCode = code switch
|
||||
{
|
||||
1 => "失败",
|
||||
2 => "无此操作权限",
|
||||
_ => "成功",
|
||||
1 => "ʧ<EFBFBD><EFBFBD>",
|
||||
2 => "<EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>",
|
||||
_ => "<EFBFBD>ɹ<EFBFBD>",
|
||||
};
|
||||
Debug.Log($"静默卸载app包名: {appPackageName}, code: {unInstallCode}");
|
||||
Debug.Log($"<EFBFBD><EFBFBD>Ĭж<EFBFBD><EFBFBD>app<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: {appPackageName}, code: {unInstallCode}");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取设备信息
|
||||
#region <EFBFBD><EFBFBD>ȡ<EFBFBD>豸<EFBFBD><EFBFBD>Ϣ
|
||||
/// <summary>
|
||||
/// pico设备SN
|
||||
/// pico<EFBFBD>豸SN
|
||||
/// </summary>
|
||||
public string PicoSN()
|
||||
{
|
||||
return StateGetDeviceInfo(SystemInfoEnum.EQUIPMENT_SN);
|
||||
}
|
||||
/// <summary>
|
||||
/// pico设备电量
|
||||
/// pico<EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string PicoPower()
|
||||
{
|
||||
return StateGetDeviceInfo(SystemInfoEnum.ELECTRIC_QUANTITY);
|
||||
}
|
||||
/// <summary>
|
||||
/// 充电状态
|
||||
/// <EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
/// </summary>
|
||||
/// <returns>“2”是充电中,“3”是没充电</returns>
|
||||
/// <returns><EFBFBD><EFBFBD>2<EFBFBD><EFBFBD><EFBFBD>dz<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD>3<EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD></returns>
|
||||
public string ChargingStatus()
|
||||
{
|
||||
return StateGetDeviceInfo(SystemInfoEnum.CHARGING_STATUS);
|
||||
}
|
||||
/// <summary>
|
||||
/// pico设备WIFI状态
|
||||
/// pico<EFBFBD>豸WIFI״̬
|
||||
/// </summary>
|
||||
public string PicoWIFIState()
|
||||
{
|
||||
return StateGetDeviceInfo(SystemInfoEnum.DEVICE_WIFI_STATUS);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取设备信息
|
||||
/// <EFBFBD><EFBFBD>ȡ<EFBFBD>豸<EFBFBD><EFBFBD>Ϣ
|
||||
/// </summary>
|
||||
string StateGetDeviceInfo(SystemInfoEnum infoEnum)
|
||||
{
|
||||
return PXR_Enterprise.StateGetDeviceInfo(infoEnum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 调节亮度
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void SetCommonBrightness(float Ilight)
|
||||
{
|
||||
PXR_System.SetCommonBrightness(int.Parse(Ilight.ToString()));
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得亮度
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
int GetCommonBrightness()
|
||||
{
|
||||
@@ -340,9 +340,9 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
|
||||
#region 控制设备关机或重启
|
||||
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD>ػ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 控制设备关机或重启
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD>ػ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void ControlDeviceShutDownOrReboot(DeviceControlEnum deviceControlEnum)
|
||||
{
|
||||
@@ -351,21 +351,21 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string Code = obj switch
|
||||
{
|
||||
1 => "失败",
|
||||
2 => "无此操作权限",
|
||||
_ => "成功",
|
||||
1 => "ʧ<EFBFBD><EFBFBD>",
|
||||
2 => "<EFBFBD>˲<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD>",
|
||||
_ => "<EFBFBD>ɹ<EFBFBD>",
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 关机
|
||||
/// <EFBFBD>ػ<EFBFBD>
|
||||
/// </summary>
|
||||
public void ShutDown()
|
||||
{
|
||||
ControlDeviceShutDownOrReboot(DeviceControlEnum.DEVICE_CONTROL_SHUTDOWN);
|
||||
}
|
||||
/// <summary>
|
||||
/// 重启
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void Reboot()
|
||||
{
|
||||
@@ -374,17 +374,17 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
|
||||
#region 设置Home按钮事件
|
||||
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Home<EFBFBD><EFBFBD>ť<EFBFBD>¼<EFBFBD>
|
||||
|
||||
/// <summary>
|
||||
/// 设置home按钮无效
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>home<EFBFBD><EFBFBD>ť<EFBFBD><EFBFBD>Ч
|
||||
/// </summary>
|
||||
public void SetHomeNoAvail()
|
||||
{
|
||||
PropertySetHomeKey(HomeEventEnum.SINGLE_CLICK, HomeFunctionEnum.VALUE_HOME_DISABLE);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置home按钮默认
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>home<EFBFBD><EFBFBD>ťĬ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void RemoveControllerHomeKey()
|
||||
{
|
||||
@@ -392,7 +392,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置Home按钮事件
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Home<EFBFBD><EFBFBD>ť<EFBFBD>¼<EFBFBD>
|
||||
/// </summary>
|
||||
public void PropertySetHomeKey(HomeEventEnum eventEnum, HomeFunctionEnum function)
|
||||
{
|
||||
@@ -401,17 +401,17 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string Code = obj switch
|
||||
{
|
||||
false => "失败",
|
||||
_ => "成功",
|
||||
false => "ʧ<EFBFBD><EFBFBD>",
|
||||
_ => "<EFBFBD>ɹ<EFBFBD>",
|
||||
};
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 设置设备永不休眠永不息屏
|
||||
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 设置设备不使用时屏幕关闭的时间
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>Ļ<EFBFBD>رյ<EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void PropertySetScreenOffDelay(ScreenOffDelayTimeEnum timeEnum)
|
||||
{
|
||||
@@ -420,41 +420,41 @@ public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
string Code = obj switch
|
||||
{
|
||||
0 => "成功",
|
||||
2 => "失败",
|
||||
10 => "应小于系统休眠时间",
|
||||
_ => "异常"
|
||||
0 => "<EFBFBD>ɹ<EFBFBD>",
|
||||
2 => "ʧ<EFBFBD><EFBFBD>",
|
||||
10 => "ӦС<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",
|
||||
_ => "<EFBFBD>쳣"
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置设备不使用时系统休眠时间
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>ʱϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void PropertySetSleepDelay(SleepDelayTimeEnum timeEnum)
|
||||
{
|
||||
PXR_Enterprise.PropertySetSleepDelay(timeEnum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置设备永不休眠永不息屏
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void NeverSleepScreenOff()
|
||||
{
|
||||
PropertySetSleepDelay(SleepDelayTimeEnum.NEVER);//永不休眠
|
||||
PropertySetScreenOffDelay(ScreenOffDelayTimeEnum.NEVER);//永不息屏
|
||||
PropertySetSleepDelay(SleepDelayTimeEnum.NEVER);//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
PropertySetScreenOffDelay(ScreenOffDelayTimeEnum.NEVER);//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 打开/关闭指定的系统功能
|
||||
#region <EFBFBD><EFBFBD>/<EFBFBD>ر<EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 打开/关闭指定的系统功能
|
||||
/// <EFBFBD><EFBFBD>/<2F>ر<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void SwitchSystemFunction(SystemFunctionSwitchEnum systemFunctionSwitchEnum, SwitchEnum switchEnum)
|
||||
{
|
||||
PXR_Enterprise.SwitchSystemFunction(systemFunctionSwitchEnum, switchEnum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 手势重定位开关
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void HandRecenter()
|
||||
{
|
||||
@@ -465,7 +465,7 @@ public class PicoAPI : MonoBehaviour
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_GESTURE_RECOGNITION_RESET_ENABLE, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 手势Home
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Home
|
||||
/// </summary>
|
||||
public void HandHome()
|
||||
{
|
||||
@@ -477,98 +477,98 @@ public class PicoAPI : MonoBehaviour
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_GESTURE_RECOGNITION_HOME_ENABLE, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 开启USB调试
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>USB<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OnUSBDebugging()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_USB, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭自动休眠
|
||||
/// <EFBFBD>ر<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffAutoSleep()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_AUTOSLEEP, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭系统升级
|
||||
/// <EFBFBD>ر<EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffSystemUpdate()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_SYSTEM_UPDATE, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 打开系统升级
|
||||
/// <EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenSystemUpdate()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_SYSTEM_UPDATE, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭自动杀后台VR应用
|
||||
/// <EFBFBD>ر<EFBFBD><EFBFBD>Զ<EFBFBD>ɱ<EFBFBD><EFBFBD>̨VRӦ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffKillVRapp()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_BASIC_SETTING_KILL_BACKGROUND_VR_APP, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 开启自动杀后台VR应用
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>ɱ<EFBFBD><EFBFBD>̨VRӦ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenKillVRapp()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_BASIC_SETTING_KILL_BACKGROUND_VR_APP, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭导航栏
|
||||
/// <EFBFBD>رյ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffNavgation()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_NAVGATION_SWITCH, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 打开导航栏
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenNavgation()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_NAVGATION_SWITCH, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设备休眠或关闭时保持网络连接
|
||||
/// <EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OnPowerCtrlWIFIEnable()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_POWER_CTRL_WIFI_ENABLE, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭系统软件升级
|
||||
/// <EFBFBD>ر<EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffSystemUpdateApp()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_SYSTEM_UPDATE_APP, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 打开系统软件升级
|
||||
/// <EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenSystemUpdateApp()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_SYSTEM_UPDATE_APP, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭应用程序退出对话框
|
||||
/// <EFBFBD>ر<EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffAppQuitConfirmDialog()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG, SwitchEnum.S_OFF);
|
||||
}
|
||||
/// <summary>
|
||||
/// 打开应用程序退出对话框
|
||||
/// <EFBFBD><EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OpenAppQuitConfirmDialog()
|
||||
{
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG, SwitchEnum.S_ON);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭6DoF位置跟踪
|
||||
/// <EFBFBD>ر<EFBFBD>6DoFλ<EFBFBD>ø<EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffSixDof()
|
||||
{
|
||||
@@ -580,7 +580,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏投屏按钮
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
/// </summary>
|
||||
public void OffCastUI()
|
||||
{
|
||||
@@ -588,54 +588,54 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// VR应用中实时响应头戴返回键
|
||||
/// VRӦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵʱ<EFBFBD><EFBFBD>Ӧͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>
|
||||
/// </summary>
|
||||
public void HMDBackKey()
|
||||
{
|
||||
//头戴返回键按下发出DOWN事件,抬起发出UP事件
|
||||
//ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD>DOWN<EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>̧<EFBFBD><EFBFBD>UP<EFBFBD>¼<EFBFBD>
|
||||
SwitchSystemFunction(SystemFunctionSwitchEnum.SFS_REAL_TIME_RESPONSE_HMD_BACK_KEY_IN_VR_APP, SwitchEnum.S_ON);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 设置音量
|
||||
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 获取最大音量
|
||||
/// <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public int GetMaxVolumeNumber()
|
||||
{
|
||||
return PXR_System.GetMaxVolumeNumber();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前音量
|
||||
/// <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public int GetCurrentVolumeNumber()
|
||||
{
|
||||
return PXR_System.GetCurrentVolumeNumber();
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加音量
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void VolumeUp()
|
||||
{
|
||||
PXR_System.VolumeUp();
|
||||
}
|
||||
/// <summary>
|
||||
/// 减小音量
|
||||
/// <EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void VolumeDown()
|
||||
{
|
||||
PXR_System.VolumeDown();
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置音量
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void SetVolumeNum(int volume)
|
||||
{
|
||||
PXR_System.SetVolumeNum(volume);
|
||||
}
|
||||
/// <summary>
|
||||
/// 音量设置到最大值
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
/// </summary>
|
||||
public void SetVolumeMaxNum()
|
||||
{
|
||||
@@ -643,9 +643,9 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 投屏设置
|
||||
#region Ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// <summary>
|
||||
/// 投屏地址
|
||||
/// Ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
||||
/// </summary>
|
||||
public string GetCastUrl()
|
||||
{
|
||||
@@ -654,7 +654,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 屏幕录制授权总是允许
|
||||
/// <EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void PICOCastSetShowAuthorization()
|
||||
{
|
||||
@@ -662,7 +662,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏投屏时蓝色图标
|
||||
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ɫͼ<EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void OffCastNotification()
|
||||
{
|
||||
@@ -670,7 +670,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 投屏设置-开启声音录制
|
||||
/// Ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>
|
||||
/// </summary>
|
||||
public void CastOption()
|
||||
{
|
||||
@@ -678,7 +678,7 @@ public class PicoAPI : MonoBehaviour
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 投屏设置
|
||||
/// Ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
void PICOCastSetOption(PICOCastOptionOrStatusEnum castOptionOrStatus, PICOCastOptionValueEnum castOptionValue)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ public class HandTakeObj : MonoBehaviour
|
||||
{
|
||||
bool isEnterObj;
|
||||
Transform goodTran;
|
||||
public PXR_Input.Controller hand;
|
||||
//public PXR_Input.Controller hand;
|
||||
XRNode xrNode;
|
||||
public Transform goodParent;
|
||||
Good good;
|
||||
@@ -54,7 +54,7 @@ public class HandTakeObj : MonoBehaviour
|
||||
{
|
||||
if (goodTran == null && other.gameObject.layer == 6)
|
||||
{
|
||||
// 通过不断查找父物体,直到没有父物体为止,获取最上层父物体
|
||||
// ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><EFBFBD>Ҹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>壬ֱ<EFBFBD><EFBFBD>û<EFBFBD>и<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊֹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ϲ㸸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
goodTran = other.transform;
|
||||
while (goodTran.parent != goodParent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user