Skip to content

Commit

Permalink
Fix Editor Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
CADIndie committed Aug 9, 2024
1 parent 3ebc09a commit bec4914
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Assets/Scripts/DesktopCam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DesktopCam : MonoBehaviour
// Start is called before the first frame update
void Start()
{
if (Application.platform != RuntimePlatform.WindowsEditor)
if (Application.platform == RuntimePlatform.Android)
return;

VrCam.SetActive(false);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/DownloadTextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DownloadTextManager : MonoBehaviour
// Update is called once per frame
void Update()
{
if (Application.platform == RuntimePlatform.WindowsEditor)
if (Application.platform != RuntimePlatform.Android)
return;
string currentFile = JNIStorage.apiClass.GetStatic<string>("currentDownload");
double mbDownloaded = TruncateDouble(JNIStorage.apiClass.GetStatic<double>("downloadStatus"), 3);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/InstanceButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class InstanceButton : MonoBehaviour

private void Update()
{
if (Application.platform == RuntimePlatform.WindowsEditor)
if (Application.platform != RuntimePlatform.Android)
return;
currInstName = JNIStorage.instance.instancesDropdown.options[JNIStorage.instance.instancesDropdown.value].text;
}
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/JNIStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class JNIStorage : MonoBehaviour
public List<string> supportedVersions;
public UIHandler uiHandler;
public TMP_Dropdown instancesDropdown;
private ConfigHandler configHandler;
public ConfigHandler configHandler;

private void Start()
{
Expand All @@ -30,7 +30,7 @@ private void Start()
instancesObj = apiClass.CallStatic<AndroidJavaObject>("loadAll");
configHandler.LoadConfig();
UpdateInstances();
apiClass.SetStatic("model", OpenXRFeatureSystemInfo.GetHeadsetName());
//apiClass.SetStatic("model", OpenXRFeatureSystemInfo.GetHeadsetName());
}

private static void FillSupportedVersions(List<string> supportedVersions, string[] supportedVersionsArray)
Expand Down Expand Up @@ -65,6 +65,7 @@ public static PojlibInstance GetInstance(string name)

public void UpdateInstances()
{
if (Application.platform != RuntimePlatform.Android) return;
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
activity = jc.GetStatic<AndroidJavaObject>("currentActivity");

Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/LoginHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async Task LoadingButtonText()
}
LoadingButtonText();

if (Application.platform == RuntimePlatform.WindowsEditor) return;
if (Application.platform != RuntimePlatform.Android) return;
if (hasAttemptedLogin) return;
javaClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
javaObject = javaClass.GetStatic<AndroidJavaObject>("currentActivity");
Expand All @@ -43,7 +43,7 @@ async Task LoadingButtonText()
}

private async void CheckVerification() {
if (Application.platform == RuntimePlatform.WindowsEditor)
if (Application.platform != RuntimePlatform.Android)
return;
while (isMainScreen == false)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/LoginText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private void Start()
void Update()
{
string buffer;
if (Application.platform == RuntimePlatform.WindowsEditor)
if (Application.platform != RuntimePlatform.Android)
buffer = debugText;
else
buffer = JNIStorage.apiClass.GetStatic<string>("msaMessage");
Expand Down
8 changes: 2 additions & 6 deletions Assets/Scripts/UiRedocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class UiRedocker : MonoBehaviour
private bool main = true;
private void Start()
{
if (Application.platform != RuntimePlatform.Android) return;

redockButton.onClick.AddListener(() =>
{
if (main)
Expand All @@ -22,12 +24,6 @@ private void Start()

main = !main;
});

return;

GameObject gender;

Transition(gender);
}

void Transition(GameObject transitionObject)
Expand Down

0 comments on commit bec4914

Please sign in to comment.