public void ReadFromSourceUSBA() { uint offset = sbc.GetDefaultOffset(); AutoInjector platformInjector; #if UNITY_STANDALONE || UNITY_EDITOR platformInjector = usbInjector; #else platformInjector = usbaInjector; #endif platformInjector.SetWriteOffset(offset); platformInjector.ValidateEnabled = UI_Settings.GetValidateData(); try { InjectionResult injectionResult = platformInjector.Read(true); if (injectionResult != InjectionResult.Success) { Debug.Log(injectionResult.ToString()); #if UNITY_STANDALONE || UNITY_EDITOR PopupHelper.CreateError(injectionResult.ToString(), 2f); #endif } } catch (Exception ex) { Debug.LogError(ex.Message); UISB.ConnectedText.text = (ex.Message); UISB.SetConnected(false); #if UNITY_STANDALONE || UNITY_EDITOR PopupHelper.CreateError(ex.Message, 2f); #endif } }
private void AfterRead(InjectionResult r) { if (r == InjectionResult.Success) { set(Items.ToArray()); } else { Debug.LogError(r.ToString()); PopupHelper.CreateError(r.ToString(), 2f); } }
private void AfterRead(InjectionResult r) { if (r == InjectionResult.Success) { set(Items.ToArray()); } else { Debug.LogError(r.ToString()); #if PLATFORM_ANDROID AndroidUSBUtils.CurrentInstance.DebugToast(r.ToString()); #endif } }
public void WriteToSource() { uint offset = sbc.GetDefaultOffset(); injector.SetWriteOffset(offset); try { InjectionResult injectionResult = injector.Write(true); if (injectionResult == InjectionResult.Success) { HappyParticles.gameObject.SetActive(true); HappyParticles.Stop(); HappyParticles.Play(); } else { Debug.Log(injectionResult.ToString()); } } catch (Exception ex) { Debug.LogError(ex.Message); UISB.ConnectedText.text = (ex.Message); UISB.SetConnected(val: false); } }
public void WriteToSource() { uint offset = sbc.GetDefaultOffset(); injector.SetWriteOffset(offset); injector.ValidateEnabled = UI_Settings.GetValidateData(); try { InjectionResult injectionResult = injector.Write(true); if (injectionResult == InjectionResult.Success) { PlayHappyParticles(); } else { Debug.Log(injectionResult.ToString()); } } catch (Exception ex) { Debug.LogError(ex.Message); UISB.ConnectedText.text = (ex.Message); UISB.SetConnected(val: false); } }
public void ReadFromSource() { uint offset = sbc.GetDefaultOffset(); injector.SetWriteOffset(offset); try { InjectionResult injectionResult = injector.Read(true); if (injectionResult != InjectionResult.Success) { Debug.Log(injectionResult.ToString()); } } catch (Exception ex) { Debug.LogError(ex.Message); UISB.ConnectedText.text = (ex.Message); UISB.SetConnected(val: false); } }