解决 运行报错的问题
This commit is contained in:
parent
cfc37a2afa
commit
0eb3599a46
|
@ -818,11 +818,11 @@ namespace Tenkoku.Core
|
|||
|
||||
void Awake(){
|
||||
//GET CAMERA OBJECT
|
||||
if (Application.isPlaying){
|
||||
if (mainCamera == null){
|
||||
mainCamera = Camera.main.transform;
|
||||
}
|
||||
}
|
||||
//if (Application.isPlaying){
|
||||
// if (mainCamera == null){
|
||||
// mainCamera = Camera.main.transform;
|
||||
// }
|
||||
//}
|
||||
|
||||
//set custom random generator instance
|
||||
randSeed = System.Environment.TickCount;
|
||||
|
|
|
@ -19,7 +19,6 @@ public class Jsonanalyze : MonoBehaviour
|
|||
// str = str.Replace("\\n", "\n");
|
||||
// str = str.Replace(" ", "");
|
||||
// str = str.Replace("\t", "");
|
||||
Debug.Log($"str==={str}");
|
||||
if (str.Length > 2)
|
||||
{
|
||||
if (str[0] == '"')
|
||||
|
|
|
@ -582,7 +582,10 @@ public class View_Panel2 : XUIPanel
|
|||
CreateSubjectInfo(currentSubjectInfo.data);
|
||||
});
|
||||
}
|
||||
currentRoomSubjectItemConnect.GetChild(1).GetComponent<Button>().onClick.Invoke();
|
||||
if (currentRoomSubjectItemConnect.childCount > 0)
|
||||
{
|
||||
currentRoomSubjectItemConnect.GetChild(1).GetComponent<Button>().onClick.Invoke();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除科目席位信息
|
||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.16745728, g: 0.30760273, b: 0.6428225, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.173026, g: 0.30194494, b: 0.57885855, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -5531,7 +5531,7 @@ Camera:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 45083524}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.30768365, g: 0.36029273, b: 0.40493077, a: 1}
|
||||
|
@ -17623,7 +17623,7 @@ Camera:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 366732980}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.39735296, g: 0.46529412, b: 0.52294123, a: 0.6}
|
||||
|
@ -17969,7 +17969,7 @@ PrefabInstance:
|
|||
- target: {fileID: 919132149155446097, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0a7e2330d22eb904d828bb934f7517e5, type: 3}
|
||||
|
@ -41809,7 +41809,10 @@ MonoBehaviour:
|
|||
userIds:
|
||||
tenkokuModule: {fileID: 1820978573}
|
||||
modelsInfo:
|
||||
models: []
|
||||
- str:
|
||||
x: 0
|
||||
y: 0
|
||||
z: 0
|
||||
--- !u!4 &1436809530
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -54363,7 +54366,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 548750171
|
||||
randSeed: 599962546
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
@ -75582,7 +75585,7 @@ TerrainCollider:
|
|||
m_GameObject: {fileID: 698992078863223868}
|
||||
m_Material: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_TerrainData: {fileID: 15600000, guid: c0b299817880e7f43b42aadfed2f817a, type: 2}
|
||||
m_TerrainData: {fileID: 15600000, guid: ae3baf912bd3a1f46900b5147b8be4c5, type: 2}
|
||||
m_EnableTreeColliders: 1
|
||||
--- !u!218 &698992078863223871
|
||||
Terrain:
|
||||
|
|
|
@ -15,10 +15,8 @@ public class GameManager : MonoBehaviour
|
|||
public TenkokuModule tenkokuModule;
|
||||
public List<ModelInfo> modelsInfo = new List<ModelInfo>();
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
private void Awake()
|
||||
{
|
||||
//SetWeatherValue();
|
||||
SetModelValue();
|
||||
SyncCreateRoom.getroomusersRequset += OnGetRoomUsers;
|
||||
SyncCreateRoom.send2roomRequset += OnOtherPlayerOnline;
|
||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||
|
@ -27,6 +25,13 @@ public class GameManager : MonoBehaviour
|
|||
spt.gameObject.transform.eulerAngles = spawnPos.eulerAngles;
|
||||
spt.SetPlayerInfo(ulong.Parse(GlobalFlag.currentUser.user_id), GlobalFlag.currentUser.login_name, ulong.Parse(GlobalFlag.roomID), true);
|
||||
userIds.Add(ulong.Parse(GlobalFlag.currentUser.user_id));
|
||||
tenkokuModule.mainCamera = spt.transform;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
SetWeatherValue();
|
||||
SetModelValue();
|
||||
string msg = "getroomusers ";
|
||||
_ = SyncCreateRoom.SendMessageAsync(msg);
|
||||
}
|
||||
|
@ -111,7 +116,7 @@ public class GameManager : MonoBehaviour
|
|||
{
|
||||
GameObject obj = Resources.Load<GameObject>(modelsInfo[i].str);
|
||||
GameObject go = Instantiate(obj);
|
||||
go.transform.position = new Vector3(float.Parse( modelsInfo[i].x.ToString()), float.Parse(modelsInfo[i].y.ToString()), float.Parse(modelsInfo[i].z.ToString()));
|
||||
go.transform.position = new Vector3(float.Parse(modelsInfo[i].x.ToString()), float.Parse(modelsInfo[i].y.ToString()), float.Parse(modelsInfo[i].z.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
public async void GetSceneData(string roomId)
|
||||
{
|
||||
string _url = sceneInfoUrl + roomId;
|
||||
Debug.LogError(_url);
|
||||
//Debug.LogError(_url);
|
||||
currentSceneInfo = await AsyncWebReq.Get<SceneRoot>(_url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue