You've already forked Dpr-ScriptsOnly
mirror of
https://github.com/izzy2lost/Dpr-ScriptsOnly.git
synced 2026-03-10 11:49:05 -07:00
35 lines
935 B
C#
35 lines
935 B
C#
using SmartPoint.Components;
|
|
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class SceneLoader : MonoBehaviour
|
|
{
|
|
void Start()
|
|
{
|
|
var eventTrigger = GetComponent<EventTrigger>();
|
|
var entry = new EventTrigger.Entry();
|
|
entry.eventID = EventTriggerType.PointerClick;
|
|
entry.callback.AddListener((data) => OnPointerClickDelegate((PointerEventData)data));
|
|
eventTrigger.triggers.Add(entry);
|
|
}
|
|
|
|
public void OnPointerClickDelegate(PointerEventData data)
|
|
{
|
|
if (!string.IsNullOrEmpty(tapSE))
|
|
{
|
|
// Assuming AudioPlayer is a class with a static method PlayEffect
|
|
AudioPlayer.PlayEffect(tapSE, 1.0f);
|
|
}
|
|
|
|
// Assuming SceneBrowser is a class with a static method Open
|
|
//SceneBrowser.Open(scenePath, true);
|
|
}
|
|
|
|
public string scenePath;
|
|
|
|
public string webViewURL;
|
|
|
|
public string tapSE;
|
|
}
|