修改fbx读写

This commit is contained in:
shenjianxing 2025-01-09 11:28:16 +08:00
parent 0eee064d11
commit efc545129b
12 changed files with 255 additions and 62 deletions

File diff suppressed because one or more lines are too long

View File

@ -117,7 +117,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: e7a91a7be44e48e4c92ed033f514c4bf
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -457,7 +457,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -465,6 +465,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -492,6 +493,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -524,6 +526,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: a0e0f7332037eee4d807eb38c7e94c9f
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -42,7 +42,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -50,6 +50,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -77,6 +78,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -109,6 +111,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 06be2ce632f10c2449522121c1a50cc5
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -417,7 +417,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -425,6 +425,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -452,6 +453,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -484,6 +486,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: bab6a621eac3c364d8e3b2175bb7e836
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -72,7 +72,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -80,6 +80,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -107,6 +108,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -139,6 +141,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: abef0aed314fcaf4d9b4f0a6d537cf95
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -97,7 +97,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -105,6 +105,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -132,6 +133,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -164,6 +166,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 29ec14ed384865244bfa2f71f0598d5f
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -182,7 +182,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -190,6 +190,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -217,6 +218,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -249,6 +251,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 6d0303911f413ab4391ab98ee2c2f263
ModelImporter:
serializedVersion: 21300
serializedVersion: 22200
internalIDToNameTable: []
externalObjects:
- first:
@ -152,7 +152,7 @@ ModelImporter:
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
@ -160,6 +160,7 @@ ModelImporter:
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
@ -187,6 +188,7 @@ ModelImporter:
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
@ -219,6 +221,7 @@ ModelImporter:
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 0
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:

View File

@ -0,0 +1,50 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
public class SetReadWrite : Editor
{
[MenuItem("Assets/FBX Read/Write Enable %&r", false, 100)]
static void EnableFBXReadWrite()
{
Object[] selectedObjects = Selection.GetFiltered<Object>(SelectionMode.DeepAssets);
foreach (Object obj in selectedObjects)
{
if (obj != null)
{
string path = AssetDatabase.GetAssetPath(obj);
if (Directory.Exists(path))
{
EnableFBXReadWriteInFolder(path);
}
else if (path.EndsWith(".fbx", System.StringComparison.OrdinalIgnoreCase))
{
EnableFBXReadWriteForFile(path);
}
}
}
}
static void EnableFBXReadWriteInFolder(string folderPath)
{
string[] files = Directory.GetFiles(folderPath, "*.fbx", SearchOption.AllDirectories);
foreach (string file in files)
{
EnableFBXReadWriteForFile(file);
}
}
static void EnableFBXReadWriteForFile(string filePath)
{
string relativePath = filePath.Substring(Application.dataPath.Length - "Assets".Length);
ModelImporter importer = AssetImporter.GetAtPath(relativePath) as ModelImporter;
if (importer != null)
{
importer.isReadable = true;
AssetDatabase.ImportAsset(relativePath, ImportAssetOptions.ForceUpdate);
Debug.Log("Enabled Read/Write for: " + relativePath);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a1465669937f2bd41bb9445a4ad56e2b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -348,16 +348,18 @@
<Device>
<Name>24G静脉留置针</Name>
<HighLight color="255,255,255"/>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/liuzhizhen/pasted__pasted__polySurface560</Path>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/liuzhizhen</Path>
<Tip>24G静脉留置针</Tip>
<MeshCollider/>
<BoxCollider size="0.05,0.05,0.1" center="0,0,0"></BoxCollider>
<Icon>耗材/骨蜡.png</Icon>
</Device>
<Device>
<Name>一次性注射器</Name>
<Name>一次性输液</Name>
<HighLight color="255,255,255"/>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/SM_ShuYeQi</Path>
<Tip>一次性注射</Tip>
<Tip>一次性输液</Tip>
<MeshCollider/>
<Icon>耗材/骨蜡.png</Icon>
</Device>
@ -404,13 +406,15 @@
<Icon>耗材/骨蜡.png</Icon>
</Device>
<Device>
<Name>一次性注射器1</Name>
<Name>一次性注射器</Name>
<HighLight color="255,255,255"/>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/zhusheqi</Path>
<Tip>一次性注射器</Tip>
<MeshCollider/>
<Icon>耗材/骨蜡.png</Icon>
</Device>
<Device>
<Name>肝素帽</Name>
<HighLight color="255,255,255"/>
@ -438,19 +442,21 @@
<Device>
<Name>带针PGA缝线</Name>
<HighLight color="255,255,255"/>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/zhenxian/平面</Path>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/zhenxian</Path>
<Tip>带针PGA缝线</Tip>
<MeshCollider/>
<BoxCollider size="0.1,0.01,0.08" center="0,0,0"></BoxCollider>
<Icon>耗材/骨蜡.png</Icon>
</Device>
<Device>
<Name>听诊器</Name>
<HighLight color="255,255,255"/>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/SM_TingZhenQi/Archmodels70_054_01</Path>
<Path>Environment/SM_QvanChangJing/SM_BuLiaoLei/SM_TingZhenQi</Path>
<Tip>听诊器</Tip>
<MeshCollider/>
<BoxCollider size="0.28,0.01,0.22" center="0,0,0"></BoxCollider>
<Icon>耗材/骨蜡.png</Icon>
</Device>
<Device>
<Name>一次性手术帽</Name>
<HighLight color="255,255,255"/>
@ -525,6 +531,7 @@
</Device>
<Device>
<Name>体重秤</Name>
<HighLight color="255,255,255"/>
@ -659,13 +666,13 @@
<Action type="Show" value="无菌敷料" isShow="false" isDevice="true"></Action>
<Action type="Show" value="纱布绷带" isShow="false" isDevice="true"></Action>
<Action type="Show" value="24G静脉留置针" isShow="false" isDevice="true"></Action>
<Action type="Show" value="一次性注射器" isShow="false" isDevice="true"></Action>
<Action type="Show" value="一次性输液器" isShow="false" isDevice="true"></Action>
<Action type="Show" value="纸胶带" isShow="false" isDevice="true"></Action>
<Action type="Show" value="弹性粘性绷带" isShow="false" isDevice="true"></Action>
<Action type="Show" value="大胶带" isShow="false" isDevice="true"></Action>
<Action type="Show" value="刷手毛刷" isShow="false" isDevice="true"></Action>
<Action type="Show" value="宠物电子体温计" isShow="false" isDevice="true"></Action>
<Action type="Show" value="一次性注射器1" isShow="false" isDevice="true"></Action>
<Action type="Show" value="一次性注射器" isShow="false" isDevice="true"></Action>
<Action type="Show" value="肝素帽" isShow="false" isDevice="true"></Action>
<Action type="Show" value="创巾" isShow="false" isDevice="true"></Action>
<Action type="Show" value="保定保温毛巾" isShow="false" isDevice="true"></Action>
@ -677,7 +684,9 @@
<Action type="Show" value="无菌擦手纸" isShow="false" isDevice="true"></Action>
<Action type="Show" value="无菌纱布" isShow="false" isDevice="true"></Action>
<Action type="Show" value="酒精棉球" isShow="false" isDevice="true"></Action>
<Action type="Show" value="碘伏棉球" isShow="false" isDevice="true"></Action>
<Action type="Show" value="监测记录表" isShow="false" isDevice="true"></Action>
<Action type="Show" value="保定绳" isShow="false" isDevice="true"></Action>
@ -723,6 +732,7 @@
<Step name="器械准备">
<Reset>
<Action type="Sequence">
<Action type="Log" value="111"></Action>
<Action type="Show" value="Environment/SM_QvanChangJing/SM_JianZiLei" isShow="false" isRoot="true"></Action>
</Action>
</Reset>
@ -769,6 +779,7 @@
</Start>
<Finished>
<Action type="Sequence">
<Action type="Log" value="222"></Action>
<Action type="Show" value="Environment/SM_QvanChangJing/SM_JianZiLei" isShow="true" isRoot="true"></Action>
</Action>
</Finished>
@ -821,8 +832,8 @@
<!--洗手液 无菌手术刀片 监测记录表-->
<Action type="UITools"
devices="监测记录表,电动剃毛刀,医用外科罩,无菌敷料,纱布绷带,24G静脉留置针,一次性注射器,纸胶带,弹性粘性绷带,大胶带,刷手毛刷,宠物电子体温计,一次性注射器1,肝素帽,创巾,保定保温毛巾,带针PGA缝线,听诊器,一次性手术帽,一次性手术衣,一次性外科灭菌手套,无菌擦手纸,无菌纱布,酒精棉球,保定绳,骨钉,冲洗管,T管,钢丝,骨蜡"
answers="监测记录表,电动剃毛刀,医用外科罩,无菌敷料,纱布绷带,24G静脉留置针,一次性注射器,纸胶带,弹性粘性绷带,大胶带,刷手毛刷,宠物电子体温计,一次性注射器1,肝素帽,创巾,保定保温毛巾,带针PGA缝线,听诊器,一次性手术帽,一次性手术衣,一次性外科灭菌手套,无菌擦手纸,无菌纱布,酒精棉球,保定绳"
devices="监测记录表,电动剃毛刀,医用外科罩,无菌敷料,纱布绷带,24G静脉留置针,一次性输液器,纸胶带,弹性粘性绷带,大胶带,刷手毛刷,宠物电子体温计,一次性注射器,肝素帽,创巾,保定保温毛巾,带针PGA缝线,听诊器,一次性手术帽,一次性手术衣,一次性外科灭菌手套,无菌擦手纸,无菌纱布,酒精棉球,保定绳,碘伏棉球,骨钉,冲洗管,T管,钢丝,骨蜡"
answers="监测记录表,电动剃毛刀,医用外科罩,无菌敷料,纱布绷带,24G静脉留置针,一次性输液器,纸胶带,弹性粘性绷带,大胶带,刷手毛刷,宠物电子体温计,一次性注射器,肝素帽,创巾,保定保温毛巾,带针PGA缝线,听诊器,一次性手术帽,一次性手术衣,一次性外科灭菌手套,无菌擦手纸,无菌纱布,酒精棉球,保定绳,碘伏棉球"
setActive="true"
rightLabel="提示:药品选择正确。"
wrongLabel="提示:药品选择错误,\r\n药品准备中不需要该物品。"
@ -2283,10 +2294,10 @@
<Action type="CameraSwitch" nearPos="-1.298339,2.227672,0.1251958" nearRot="47.61902,94.25353,0" nearTime="0" normalPos="-1.298339,2.227672,0.1251958" normalRot="-1.298339,2.227672,0.1251958" normalTime="0" isNear="false"></Action>
<Action type="Any">
<Action type="Sequence">
<Condition type="ObjClick" deviceName="一次性注射器" ></Condition>
<Condition type="ObjClick" deviceName="一次性输液器" ></Condition>
</Action>
<Action type="Sequence">
<Condition type="ObjClick" deviceName="一次性注射器" isRight="false"></Condition>
<Condition type="ObjClick" deviceName="一次性输液器" isRight="false"></Condition>
<Action type="Hint" value="选择错误,应使用注射器操作" time="2" icon="true"></Action>
</Action>
</Action>