You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
#endif
|
|
|
|
/// <summary>
|
|
/// this class is for logic test.
|
|
/// if you build with this class, this class must be nothing to do.
|
|
/// </summary>
|
|
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
|
|
}
|