mirror of
https://git.aaro.dev/VRCBoard/vrcboard-udon.git
synced 2026-03-17 04:49:45 +00:00
feat: GitHub integration and URL management
All checks were successful
Create Unity Package / package (push) Successful in 8s
All checks were successful
Create Unity Package / package (push) Successful in 8s
This commit is contained in:
@@ -6,6 +6,7 @@ using VRC.SDK3.Data;
|
||||
|
||||
using UnityEditor;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon.Common.Enums;
|
||||
|
||||
namespace VRCBoard.Components
|
||||
{
|
||||
@@ -44,12 +45,6 @@ namespace VRCBoard.Components
|
||||
|
||||
if (imageIds.Length == 0) return;
|
||||
_uploaderId = GetUploader(imageIds[0]);
|
||||
|
||||
if (string.IsNullOrEmpty(_uploaderId))
|
||||
{
|
||||
Debug.LogWarning("Failed to get uploader ID");
|
||||
//return;
|
||||
}
|
||||
for (int i = 0; i < imageIds.Length; i++)
|
||||
{
|
||||
string imageId = imageIds[i];
|
||||
@@ -73,13 +68,8 @@ namespace VRCBoard.Components
|
||||
TryGetUploader();
|
||||
}
|
||||
|
||||
protected override void OnImageLoaded()
|
||||
public void _ApplyImageToMaterial()
|
||||
{
|
||||
//Debug.Log("Image loaded VRCBoardImage");
|
||||
|
||||
|
||||
//bool textureSuccess = GetImageAtlasTexture(albedoImageId, _uploaderId, out Texture2D texture, out int atlasPosition, out int atlasSize, out string type1);
|
||||
|
||||
MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
|
||||
|
||||
for (int i = 0; i < imageIds.Length; i++)
|
||||
@@ -102,6 +92,11 @@ namespace VRCBoard.Components
|
||||
|
||||
if (_renderer) _renderer.SetPropertyBlock(propertyBlock,materialIndex);
|
||||
}
|
||||
protected override void OnImageLoaded()
|
||||
{
|
||||
if (manager == null) return;
|
||||
SendCustomEventDelayedFrames(nameof(_ApplyImageToMaterial), manager.waitIndex++, EventTiming.LateUpdate);
|
||||
}
|
||||
}
|
||||
#if UNITY_EDITOR && !COMPILER_UDONSHARP
|
||||
[CustomEditor(typeof(VRCBoardImage), true)]
|
||||
|
||||
Reference in New Issue
Block a user