2using System.Collections;
3using System.Collections.Generic;
13using NaughtyAttributes;
28 private bool isLoading =
true;
31 internal GameObject paretnObject;
32 private Coroutine lateRebuild;
34 public bool EditorFastLoad;
36 System.Diagnostics.Stopwatch stopwatch =
new System.Diagnostics.Stopwatch();
42 currentPreloader = FindObjectOfType<Preloader>();
44 paretnObject =
new GameObject(
"uploaded objects");
45 paretnObject.SetActive(
false);
47 cadLoader = GameObject.Find(
"RuntimeTriLibLoader")?.GetComponent<
RuntimeCADLoader>();
50 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"models"));
51 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"pictures"));
52 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"quizes"));
53 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"sounds"));
54 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"videos"));
55 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"scripts"));
56 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"helps"));
59 WebGLFileUploadManager.SetDebug(
false);
61#
if UNITY_WEBGL && !UNITY_EDITOR
62 WebGLFileUploadManager.IsMOBILE
64 Application.isMobilePlatform
68 WebGLFileUploadManager.Show(
false);
69 WebGLFileUploadManager.SetDescription(
"Select assets files");
74 WebGLFileUploadManager.Show(
true);
75 WebGLFileUploadManager.SetDescription(
"Húzza ide a feltöltendõ fájljait");
77 WebGLFileUploadManager.SetImageShrinkingSize(4096, 4096);
79 WebGLFileUploadManager.onFileUploaded += OnFileUploaded;
82#if UNITY_EDITOR && !UNITY_WEBGL
112 if (
string.IsNullOrEmpty(value))
117 retval = paretnObject.transform.Find(value)?.gameObject;
118 return retval !=
null;
124 UnityDragAndDropHook.InstallHook();
125 UnityDragAndDropHook.OnDroppedFiles +=
OnFiles;
130 WebGLFileUploadManager.onFileUploaded -= OnFileUploaded;
131 WebGLFileUploadManager.Dispose();
136 UnityDragAndDropHook.UninstallHook();
139 public IEnumerator
ThreadedLoad(List<string> aFiles,
bool recursive =
false)
155 byte loadbalance = 0;
156 foreach (var aFile
in aFiles)
160 if (loadbalance % 2 == 0)
171 if (Directory.Exists(aFile))
173 var files = Directory.GetFiles(aFile);
193 Debug.Log($
"All files loaded in: {stopwatch.ElapsedMilliseconds}ms");
200 if (keys.name == Path.GetFileName(aFile))
209 if (result.Length == 0)
211 Debug.Log(
"File upload Error!");
218 Debug.Log(
"File upload success! (result.Length: " + result.Length +
")");
221 foreach (var file
in result)
223 Debug.Log($
"{file.name}|{file.isSuccess}");
226 OnFiles(
new List<string> { file.filePath.Replace(
'/',
'\\') },
new POINT(1, 1));
233 if (!stopwatch.IsRunning)
236 Debug.Log(
"File loading started!");
242 for (
int i = 0; i < aFiles.Count; i++)
244 aFiles[i] = aFiles[i].Replace(
'/',
'\\');
246 foreach (var file
in aFiles)
248 var current = stopwatch.ElapsedMilliseconds;
252 var filetype = file.Substring(file.LastIndexOf(
'.') + 1).ToLower();
256 var ab = AssetBundle.LoadFromMemory(File.ReadAllBytes(file));
265 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"pictures", file.Substring(file.LastIndexOf(
'\\') + 1))))
266 File.Copy(file, Path.Combine(Application.streamingAssetsPath,
"pictures", file.Substring(file.LastIndexOf(
'\\') + 1)));
268 var go =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
269 var ri = go.AddComponent<RawImage>();
270 var canvas = go.AddComponent<Canvas>();
271 go.GetComponent<RectTransform>().sizeDelta = Vector2.one;
274 var fileData = File.ReadAllBytes(Path.Combine(Application.streamingAssetsPath,
"pictures",
275 file.Substring(file.LastIndexOf(
'\\') + 1)));
277 var fileData = File.ReadAllBytes(file.Replace(
'\\',
'/'));
281 if (currentPreloader && currentPreloader.
HasFileLoaded(go.name, out var picgo))
283 ri.texture = picgo.GetComponent<RawImage>().texture;
290 var tex =
new Texture2D(1, 1);
291 var time = stopwatch.ElapsedMilliseconds;
301 tex.LoadImage(fileData);
304 Debug.Log($
"image load time: {stopwatch.ElapsedMilliseconds - time}ms");
322 uf.fileName = file.Substring(file.LastIndexOf(
'\\') + 1);
335 go.transform.SetParent(paretnObject.transform,
true);
340 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"videos", file.Substring(file.LastIndexOf(
'\\') + 1))))
341 File.Copy(file, Path.Combine(Application.streamingAssetsPath,
"videos", file.Substring(file.LastIndexOf(
'\\') + 1)));
343 var vidgo =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
344 var vp = vidgo.AddComponent<VideoPlayer>();
346 vp.url = file.Replace(
'\\',
'/');
349 vp.url = Path.Combine(Application.streamingAssetsPath,
"videos", file.Substring(file.LastIndexOf(
'\\') + 1));
353 vp.playOnAwake =
true;
354 var rt =
new RenderTexture(512, 512, 0);
355 vidgo.AddComponent<Canvas>();
356 var riv = vidgo.AddComponent<RawImage>();
358 vp.renderMode = VideoRenderMode.RenderTexture;
359 vp.targetTexture = rt;
361 tc = vidgo.AddComponent<
TagCloud>();
367 ufv.
modelData = File.ReadAllBytes(file.Replace(
'\\',
'/'));
368 ufv.fileName = file.Substring(file.LastIndexOf(
'\\') + 1);
380 vidgo.GetComponent<RectTransform>().sizeDelta = Vector2.one;
382 vidgo.transform.SetParent(paretnObject.transform,
true);
401 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"sounds", file.Substring(file.LastIndexOf(
'\\') + 1))))
402 File.Copy(file, Path.Combine(Application.streamingAssetsPath,
"sounds", file.Substring(file.LastIndexOf(
'\\') + 1)));
403 var newPath = Path.Combine(Application.streamingAssetsPath,
"sounds", file.Substring(file.LastIndexOf(
'\\') + 1));
404 var so =
new GameObject(newPath.Substring(file.LastIndexOf(
'\\') + 1));
418 var so =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
428 ufs.
modelData = File.ReadAllBytes(file.Replace(
'\\',
'/'));
429 ufs.fileName = file.Substring(file.LastIndexOf(
'\\') + 1);
440 Debug.Log(
"sound uploaded:" + ws.ToString());
441 naudio.SetFilePath(UrlCombine.Combine(NetworkManager.instance.url, ws.fileSavedURL));
442 pb_PrefabBrowser.instance?.ReloadAll();
451 Debug.Log(
"sound uploaded:" + ws.ToString());
452 naudio.SetFilePath(UrlCombine.Combine(NetworkManager.instance.url, ws.fileSavedURL));
453 pb_PrefabBrowser.instance?.ReloadAll();
463 so.transform.SetParent(paretnObject.transform,
true);
528 var newPathModel = file;
529 var filename = file.Substring(file.LastIndexOf(
'\\') + 1);
531 var files =
new DirectoryInfo(Application.streamingAssetsPath)
532 .EnumerateFiles(filename, SearchOption.AllDirectories)
534 var samefile =
false;
535 foreach (var file1
in files)
537 if (file1.Length ==
new DirectoryInfo(Path.GetDirectoryName(file)).EnumerateFiles(Path.GetFileName(file)).First().Length)
545 if (!samefile || !
new DirectoryInfo(Application.streamingAssetsPath)
546 .EnumerateFiles(file.Substring(file.LastIndexOf(
'\\') + 1), SearchOption.AllDirectories)
547 .Select(d => d.FullName).Any())
549 if (!Directory.Exists(Path.Combine(Application.streamingAssetsPath,
"models")))
551 Directory.CreateDirectory(Path.Combine(Application.streamingAssetsPath,
"models"));
553 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"models", file.Substring(file.LastIndexOf(
'\\') + 1))))
554 File.Copy(file, Path.Combine(Application.streamingAssetsPath,
"models", file.Substring(file.LastIndexOf(
'\\') + 1)));
555 newPathModel = Path.Combine(Application.streamingAssetsPath,
"models", file.Substring(file.LastIndexOf(
'\\') + 1));
558 newPathModel = newPathModel.Replace(
'\\',
'/');
565 modelname = newPathModel.Remove(0, newPathModel.LastIndexOf(
"\\") + 1);
569 modelname = newPathModel;
571 if (currentPreloader && currentPreloader.
HasFileLoaded(modelname, out go))
573 var newSpawn = Instantiate(go, paretnObject.transform);
574 newSpawn.name = newSpawn.name.Replace(
"(Clone)",
"");
575 var tc3 = newSpawn.AddComponent<
TagCloud>();
579 ComponentAdder(newSpawn);
589 if (filetype ==
"glb" || filetype ==
"gltf")
598 trlib.
LoadFromMemory(File.ReadAllBytes(newPathModel), newPathModel, paretnObject, aPos.x != -1);
600 trlib.
LoadFromMemory(File.ReadAllBytes(newPathModel), newPathModel, paretnObject,
607 ModLoader(file.Substring(file.LastIndexOf(
'\\') + 1), File.ReadAllText(file.Replace(
'\\',
'/')));
609 ModLoader(file.Substring(file.LastIndexOf(
'\\') + 1), File.ReadAllText(file));
615 var load =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
616 var tmp = load.AddComponent<TextMeshPro>();
618 var txt = File.ReadAllText(file.Replace(
'\\',
'/'));
620 var txt = File.ReadAllText(file);
625 tmp.text = txt.Remove(0, txt.IndexOf(
"\n") + 1);
626 tmp.autoSizeTextContainer =
true;
627 tmp.extraPadding =
true;
628 var c = load.AddComponent<Canvas>();
629 c.renderMode = RenderMode.WorldSpace;
631 var mr = load.GetComponent<MeshRenderer>();
632 var bgGo =
new GameObject(
"BG");
633 bgGo.transform.SetParent(load.transform);
634 StartCoroutine(ResizeHelpBG(mr, bgGo, file));
635 var bg = bgGo.AddComponent<
Image>();
636 bg.material = GameObject.Find(
"ReferenceHelpUI").GetComponent<
ReferenceSaver>().ReferenceV2 as Material;
644 uft.
modelData = Encoding.UTF8.GetBytes(txt);
649 load.transform.localScale = Vector3.one * 0.02f;
667 if (file.Contains(
"startup.lua"))
669 var lua =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
670 lua.transform.SetParent(paretnObject.transform);
672 var txtl = File.ReadAllText(file.Replace(
'\\',
'/'));
674 var txtl = File.ReadAllText(file);
677 ufl.
modelData = Encoding.UTF8.GetBytes(txtl);
678 ufl.fileName = file.Substring(file.LastIndexOf(
'\\') + 1);
688 var qiz =
new GameObject(file.Substring(file.LastIndexOf(
'\\') + 1));
690 var txtq = File.ReadAllText(file.Replace(
'\\',
'/'));
692 var txtq = File.ReadAllText(file);
694 qiz.transform.SetParent(paretnObject.transform);
696 ufq.
modelData = Encoding.UTF8.GetBytes(txtq);
697 ufq.fileName = file.Substring(file.LastIndexOf(
'\\') + 1);
702 if (file.ToLower() == file.Substring(file.LastIndexOf(
'.') + 1).ToLower())
706 var ab2 = AssetBundle.LoadFromMemory(File.ReadAllBytes(file.Replace(
'\\',
'/')));
708 var ab2 = AssetBundle.LoadFromMemory(File.ReadAllBytes(file));
714 if (file.EndsWith(
".meta"))
718 Debug.Log(file.Substring(file.LastIndexOf(
'.') + 1).ToLower() +
" no cases to this file");
722 Macro.
T(
"UNSUPPORTED_FILE_TEXT"));
726 Debug.Log($
"'{file.Remove(0, file.LastIndexOf("\\
") + 1)}' loaded in {stopwatch.ElapsedMilliseconds - current}ms");
735 void ComponentAdder(GameObject go)
737 if (go.GetComponent<MeshFilter>() && !go.GetComponent<Collider>())
739 var coll = go.AddComponent<MeshCollider>();
743 if (go.GetComponent<MeshRenderer>())
745 var mr = go.GetComponent<MeshRenderer>();
746 foreach (var material
in mr.materials)
748 if (material.mainTexture ==
null)
750 material.mainTexture = Resources.Load<Texture>(
"2k_white");
752 if (material.HasProperty(
"_Glossiness"))
754 var smoothness = material.GetFloat(
"_Glossiness");
757 if (material.HasProperty(
"_Metallic"))
759 var smoothness = material.GetFloat(
"_Metallic");
765 for (
int i = 0; i < go.transform.childCount; i++)
767 ComponentAdder(go.transform.GetChild(i).gameObject);
775 StandaloneFileBrowser.OpenFilePanelAsync(
"Select a file to upload",
null, GetExtensions(),
true, (itemList) =>
777 foreach (var itemWithStream
in itemList)
779 OnFileData(ReadFully(itemWithStream.OpenStream()), itemWithStream.Name, TimeStamp(), newUpload:
true);
787 private static ExtensionFilter[] GetExtensions()
789 var extensions = Readers.Extensions;
790 var extensionFilters =
new List<ExtensionFilter>();
791 var subExtensions =
new List<string>();
792 foreach (var extension
in extensions)
794 extensionFilters.Add(
new ExtensionFilter(
null, extension));
795 subExtensions.Add(extension);
797 subExtensions.Add(
"zip");
798 subExtensions.Add(
"bmp");
799 subExtensions.Add(
"jpg");
800 subExtensions.Add(
"jpeg");
801 subExtensions.Add(
"png");
802 subExtensions.Add(
"mp4");
803 subExtensions.Add(
"mp3");
804 subExtensions.Add(
"wav");
805 extensionFilters.Add(
new ExtensionFilter(
null,
new[] {
"zip" }));
806 extensionFilters.Add(
new ExtensionFilter(
"All Files",
new[] {
"*" }));
807 extensionFilters.Insert(0,
new ExtensionFilter(
"Accepted Files", subExtensions.ToArray()));
808 return extensionFilters.ToArray();
811 public static byte[] ReadFully(Stream input)
813 byte[] buffer =
new byte[16 * 1024];
814 using (MemoryStream ms =
new MemoryStream())
817 while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
819 ms.Write(buffer, 0, read);
825 private string TimeStamp()
827 var now = DateTime.Now;
829 return $
"{now.Year}-{now.Month:D2}-{now.Day:D2}T{now.Hour:D2}:{now.Minute:D2}:{now.Second:D2}.{now.Millisecond:D3}Z";
840 switch (fileName.Substring(fileName.LastIndexOf(
'.') + 1).ToLower())
843 var ab = AssetBundle.LoadFromMemory(fileData);
853 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"pictures", fileName)))
854 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"pictures", fileName), fileData);
857 var go =
new GameObject(fileName);
858 var ri = go.AddComponent<RawImage>();
859 var canvas = go.AddComponent<Canvas>();
860 go.GetComponent<RectTransform>().sizeDelta = Vector2.one;
864 var tex =
new Texture2D(1, 1);
865 tex.LoadImage(fileData);
885 uf.fileName = fileName;
908 go.transform.SetParent(paretnObject.transform,
true);
913 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"videos", fileName)))
914 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"videos", fileName), fileData);
916 var vidgo =
new GameObject(fileName);
917 var vp = vidgo.AddComponent<VideoPlayer>();
921 vp.playOnAwake =
true;
922 var rt =
new RenderTexture(512, 512, 0);
923 vidgo.AddComponent<Canvas>();
924 var riv = vidgo.AddComponent<RawImage>();
926 vp.renderMode = VideoRenderMode.RenderTexture;
927 vp.targetTexture = rt;
929 tc = vidgo.AddComponent<
TagCloud>();
936 ufv.fileName = fileName;
956 vidgo.GetComponent<RectTransform>().sizeDelta = Vector2.one;
958 vidgo.transform.SetParent(paretnObject.transform,
true);
976 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"sounds", fileName)))
977 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"sounds", fileName), fileData);
979 fileName = Path.GetFileName(fileName);
980 var so =
new GameObject(fileName);
992 ufs.fileName = fileName;
1007 Debug.Log(
"sound uploaded to:" + ws.ToString());
1008 naudio.SetFilePath(UrlCombine.Combine(NetworkManager.instance.url, ws.fileSavedURL));
1009 pb_PrefabBrowser.instance?.ReloadAll();
1017 Debug.Log(
"sound uploaded to:" + ws.ToString());
1018 naudio.SetFilePath(UrlCombine.Combine(NetworkManager.instance.url, ws.fileSavedURL));
1019 pb_PrefabBrowser.instance?.ReloadAll();
1026 so.transform.SetParent(paretnObject.transform,
true);
1091 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"models", fileName)))
1092 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"models", fileName), fileData);
1095 trlib.
LoadFromMemory(fileData, fileName, paretnObject, global: global, singleModel: newUpload);
1098 ModLoader(fileName, Encoding.UTF8.GetString(fileData), global, newUpload);
1102 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"helps", fileName)))
1103 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"helps", fileName), fileData);
1105 Debug.Log($
"hlp saver if failed: {File.Exists(Path.Combine(Application.streamingAssetsPath, "helps
", fileName))}");
1107 Debug.Log(
"loading HLP file!");
1108 var load =
new GameObject(fileName);
1109 var tmp = load.AddComponent<TextMeshPro>();
1110 var txt = Encoding.UTF8.GetString(fileData);
1116 tmp.text = txt.Remove(0, txt.IndexOf(
"\n") + 1);
1117 tmp.autoSizeTextContainer =
true;
1118 tmp.extraPadding =
true;
1119 var c = load.AddComponent<Canvas>();
1120 c.renderMode = RenderMode.WorldSpace;
1122 var mr = load.GetComponent<MeshRenderer>();
1123 var bgGo =
new GameObject(
"BG");
1124 bgGo.transform.SetParent(load.transform);
1125 StartCoroutine(ResizeHelpBG(mr, bgGo,
"", global));
1126 var bg = bgGo.AddComponent<
Image>();
1127 bg.material = GameObject.Find(
"ReferenceHelpUI").GetComponent<
ReferenceSaver>().ReferenceV2 as Material;
1133 uft.fileName = fileName;
1134 uft.global = global;
1136 tc = load.AddComponent<
TagCloud>();
1140 load.transform.localScale = Vector3.one * 0.02f;
1141 Debug.Log($
"HLP {fileName} loaded!");
1156 if (fileName.Contains(
"startup.lua"))
1159 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"scripts", fileName)))
1160 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"scripts", fileName), fileData);
1162 var lua =
new GameObject(fileName);
1163 lua.transform.SetParent(paretnObject.transform);
1166 ufl.fileName = fileName;
1167 ufl.global = global;
1179 if (!File.Exists(Path.Combine(Application.streamingAssetsPath,
"quizes", fileName)))
1180 File.WriteAllBytes(Path.Combine(Application.streamingAssetsPath,
"quizes", fileName), fileData);
1182 var qiz =
new GameObject(fileName);
1183 qiz.transform.SetParent(paretnObject.transform);
1186 ufq.fileName = fileName;
1187 ufq.global = global;
1192 Debug.Log(fileName +
" no cases to this file");
1194 Macro.
T(
"UNSUPPORTED_FILE_TEXT"));
1210 if (lateRebuild !=
null)
1211 StopCoroutine(lateRebuild);
1225 yield
return new WaitForSeconds(0.11f);
1229 yield
return new WaitForEndOfFrame();
1232 var allrefabbuttno = FindObjectsOfType<pb_PrefabBrowserItemButton>();
1234 foreach (var button
in allrefabbuttno)
1236 yield
return new WaitForEndOfFrame();
1237 button.OnPointerEnter(
null);
1238 yield
return new WaitForEndOfFrame();
1239 button.OnPointerExit(
null);
1240 yield
return new WaitForEndOfFrame();
1251 IEnumerator DownloadImage(
string MediaUrl, RawImage ri, GameObject go)
1253 UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
1254 yield
return request.SendWebRequest();
1255 if (request.isNetworkError || request.isHttpError)
1256 Debug.Log(request.error);
1258 ri.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
1262 IEnumerator ResizeHelpBG(MeshRenderer mr, GameObject go,
string filepath,
bool global =
false)
1264 yield
return new WaitForEndOfFrame();
1265 var rect = go.GetComponent<RectTransform>();
1266 Debug.Log(rect.sizeDelta);
1267 Debug.Log(mr.bounds);
1268 rect.sizeDelta =
new Vector2(mr.bounds.size.x / 0.02f, mr.bounds.size.y / 0.02f) * 1.05f;
1270 Debug.Log(
"hlp added to PB! " + mr.gameObject.name);
1271 mr.gameObject.transform.SetParent(paretnObject.transform,
true);
1274 private void ModLoader(
string fileName,
string modData,
bool global =
false,
bool newUpload =
false)
1276 StartCoroutine(LateModLoader(fileName, modData, global, newUpload));
1279 private IEnumerator LateModLoader(
string fileName,
string modData,
bool global =
false,
bool newUpload =
false)
1288 var basemodel = paretnObject.transform.Find(fileName.Replace(
".mod",
""));
1291 Debug.LogError(
"MOD does not have base model!");
1294 var moddedModel = Instantiate(basemodel, paretnObject.transform);
1295 moddedModel.name = moddedModel.name.Replace(
"(Clone)",
"") +
".mod";
1296 var meshFilter = moddedModel.GetComponentInChildren<MeshFilter>();
1297 var mesh = meshFilter.mesh;
1298 var vertices = mesh.vertices;
1299 var data = modData.Split(
'\n');
1300 foreach (var s
in data)
1304 var a = s.Split(
';');
1305 var i = Convert.ToInt32(a[0]);
1306 var x = Convert.ToSingle(a[1]);
1307 var y = Convert.ToSingle(a[2]);
1308 var z = Convert.ToSingle(a[3]);
1309 vertices[i] =
new Vector3(x, y, z);
1317 mesh.vertices = vertices;
1318 mesh.RecalculateNormals();
1320 var mc = meshFilter.gameObject.GetComponent<MeshCollider>();
1321 DestroyImmediate(mc);
1322 mc = meshFilter.gameObject.AddComponent<MeshCollider>();
1325 var tc = moddedModel.GetComponent<
TagCloud>();
1331 uf.modelData = Encoding.UTF8.GetBytes(modData);
1364 void TestLoadImage()
1366 OnFiles(
new List<string> {
@"C:\Users\UnityTeam\Downloads\Hamtaro-HAMTARO.png" },
new POINT(1, 1));
1370 void TestLoadSound()
1372 OnFiles(
new List<string> {
@"C:\Users\UnityTeam\Desktop\Zipper Case_VS 04.mp3" },
new POINT(1, 1));
1376 void TestLoadVideo()
1378 OnFiles(
new List<string> {
@"E:\smol.mp4" },
new POINT(1, 1));
1382 void TestLoadVideo2()
1384 OnFiles(
new List<string> {
@"C:\Users\UnityTeam\Downloads\file_example_MP4.mp4" },
new POINT(1, 1));
1388 void TestLoadModel()
1390 OnFiles(
new List<string> {
@"D:\GIT\UNITY\vrtanoda\Assets\StreamingAssets\models\TEA.FBX" },
new POINT(1, 1));
1394 void TestLoadModel2()
1396 OnFiles(
new List<string> {
@"C:\Users\Soma\3D Objects\tooltable_extended_2.fbx" },
new POINT(1, 1));
1409 void TestLoadGTags()
1411 OnFiles(
new List<string> {
@"E:\aaaaaa\globalTags.gtag" },
new POINT(0, 0));
UnityEngine.UI.Button Button
System.Drawing.Image Image
void StartLateRebuild(bool force=false)
bool GetUploadedGOFromName(string value, out GameObject retval)
static FileDragAndDrop instance
pb_PrefabBrowser prefabBrowser
void OnFiles(List< string > aFiles, POINT aPos)
bool alreadyLoaded(string aFile)
void SetLoading(bool value)
void OpenFileUploadDialog()
IEnumerator LateRebuild()
IEnumerator ThreadedLoad(List< string > aFiles, bool recursive=false)
void OnFileData(byte[] fileData, string fileName, string modified, NetworkManager.WSFile wsFile=default, bool global=false, bool newUpload=false)
void AddGameObject(GameObject gobject, LoadPanel panel=LoadPanel.None, string filePath="", bool global=false)
void AddBundle(AssetBundle ab)
static pb_PrefabBrowser instance
static GLTFastLoader instance
GameObject Load(byte[] data, string filename, GameObject wrapper=null, bool singleModel=false, bool global=false)
bool HasTexture(string filename)
void AddTexture(string filename, Texture2D texture)
Texture2D GetLowRes(string filename)
static GlobalTextureHolder instance
static string T(string key)
static float MinMaxClamp(float value, float min, float max)
static float StoF(string value)
void SetFilePath(string path)
bool HasFileLoaded(string filepath, out GameObject go)
void LoadFromMemory(byte[] data, string filename, GameObject wrapper=null, bool singleModel=false, bool global=false)