对fbx 支持
This commit is contained in:
parent
a826fdaafd
commit
c71d21b73b
@ -36,12 +36,22 @@ namespace Assets.Sandbox.Scripts
|
|||||||
|
|
||||||
CSceneObjInfo modeInfo = sceneObjSet.Get(id);
|
CSceneObjInfo modeInfo = sceneObjSet.Get(id);
|
||||||
|
|
||||||
Vector3 pos = new Vector3(sceneObjInfo.X / 100f, sceneObjInfo.HeightOff / 100f, sceneObjInfo.Y / 100f * -1f);
|
Vector3 pos = new Vector3(sceneObjInfo.X / 100f, sceneObjInfo.HeightOff / 100f,
|
||||||
|
sceneObjInfo.Y / 100f * -1f);
|
||||||
float mapHeight = monoKopTest.map.GetHeight(pos.x, (sceneObjInfo.Y / 100f));
|
float mapHeight = monoKopTest.map.GetHeight(pos.x, (sceneObjInfo.Y / 100f));
|
||||||
pos.y += mapHeight;
|
pos.y += mapHeight;
|
||||||
|
|
||||||
//Quaternion rot = Quaternion.AngleAxis(sceneObjInfo.YawAngle, Vector3.up);
|
//Quaternion rot = Quaternion.AngleAxis(sceneObjInfo.YawAngle, Vector3.up);
|
||||||
string modePath = "Assets/Resources/Model/Scene/" + Path.GetFileNameWithoutExtension(modeInfo.szDataName) + ".lmo.obj";
|
|
||||||
|
|
||||||
|
string modePath = "Assets/Resources/Model/Scene/" +
|
||||||
|
Path.GetFileNameWithoutExtension(modeInfo.szDataName) + ".fbx";
|
||||||
|
if (!File.Exists(modePath))
|
||||||
|
{
|
||||||
|
modePath = "Assets/Resources/Model/Scene/" +
|
||||||
|
Path.GetFileNameWithoutExtension(modeInfo.szDataName) + ".lmo.obj";
|
||||||
|
}
|
||||||
|
|
||||||
Object mode = AssetDatabase.LoadAssetAtPath<Object>(modePath);
|
Object mode = AssetDatabase.LoadAssetAtPath<Object>(modePath);
|
||||||
if (mode)
|
if (mode)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user