-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSyncTextureBase.cs
52 lines (50 loc) · 1.42 KB
/
SyncTextureBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using JetBrains.Annotations;
using System;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
using VRC.Udon.Common;
namespace net.narazaka.vrchat.sync_texture
{
public abstract class SyncTextureBase : UdonSharpBehaviour
{
/// <summary>
/// If false, do nothing.
/// </summary>
[PublicAPI]
[SerializeField]
public bool SyncEnabled = true;
[SerializeField]
public UdonBehaviour[] CallbackListeners;
/// <summary>
/// Take ownership and send texture data to other players.
///
/// If not SyncEnabled, do nothing.
/// </summary>
/// <returns>
/// actually started or not
/// </returns>
[PublicAPI]
public abstract bool StartSync();
/// <summary>
/// Take ownership and stop sending.
/// </summary>
/// <returns>
/// actually canceled or not
/// </returns>
[PublicAPI]
public abstract bool CancelSync();
/// <summary>
/// Take ownership and force start sending.
///
/// If already sending, abort and restart sending.
/// If not SyncEnabled, do nothing.
/// </summary>
/// <returns>
/// actually started or not
/// </returns>
[PublicAPI]
public abstract bool ForceStartSync();
}
}