using System.Collections; using System.Collections.Generic; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif /// /// this class is for logic test. /// if you build with this class, this class must be nothing to do. /// public class LogicTest : MonoBehaviour { #if PLATFORM_ANDROID AndroidJavaObject pluginInstance; private void Start() { #if false if(AndroidJava.InitPluginInstance("com.goodcirclegames.unityplugintest", out pluginInstance)) { Debug.Log("init success, toast repeating"); InvokeRepeating(nameof(Toast), 1.0f, 3.0f); } #endif } public void Toast() { if (pluginInstance is null) return; Debug.Log("call Toast"); pluginInstance.Call("Toast", "Say hello from unity!"); } #endif #if UNITY_EDITOR [SerializeField] RectTransform scrollView; [SerializeField] RectTransform content; [SerializeField] PointArrowInBox arrowInBox; private void Update() { arrowInBox.SetViewBox(new Rect(scrollView.anchoredPosition - content.anchoredPosition, scrollView.sizeDelta)); } #endif }