Skip to content

Instantly share code, notes, and snippets.

View dotlive's full-sized avatar
🎯
Focusing

dotlive dotlive

🎯
Focusing
View GitHub Profile
@dotlive
dotlive / dependency_test.md
Created March 25, 2024 14:59 — forked from QXSoftware/dependency_test.md
资源依赖正确性测试

资源依赖正确性测试

本次测试包含对AssetDatabase.GetDependenciesEditorUtility.CollectDependencies这两个获取资源的依赖资源的 API 的测试,以及对于meta残留对打AssetBundle的影响。

AssetDatabase.GetDependencies

输入资源路径,例如Assets/Material/demo.mat,以路径形式返回该资源依赖的资源列表,例如Assets/Texture/demo.jpg

这个 API 返回的结果是“错误”的,也就是带残留的。比如某个材质,原本的shader引用了4个纹理,然后切换其shader为新的shader使之只引用一个纹理,这时AssetDatabase.GetDependencies返回的结果还是4个纹理。

@dotlive
dotlive / dependency_test.md
Created March 25, 2024 14:59 — forked from QXSoftware/dependency_test.md
资源依赖正确性测试

资源依赖正确性测试

本次测试包含对AssetDatabase.GetDependenciesEditorUtility.CollectDependencies这两个获取资源的依赖资源的 API 的测试,以及对于meta残留对打AssetBundle的影响。

AssetDatabase.GetDependencies

输入资源路径,例如Assets/Material/demo.mat,以路径形式返回该资源依赖的资源列表,例如Assets/Texture/demo.jpg

这个 API 返回的结果是“错误”的,也就是带残留的。比如某个材质,原本的shader引用了4个纹理,然后切换其shader为新的shader使之只引用一个纹理,这时AssetDatabase.GetDependencies返回的结果还是4个纹理。

@dotlive
dotlive / Rebind.cs
Created March 8, 2022 01:23 — forked from tsubaki/Rebind.cs
動的なバインド(ControlTrackのControlPlayableAsset)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using System.Linq;
using UnityEngine.Timeline;
using UnityEngine.Assertions;
public class Rebind : MonoBehaviour
{
@dotlive
dotlive / HudControl.cs
Created March 7, 2019 03:06 — forked from westhillapps/HudControl.cs
uGUIで3D空間のオブジェクト上に追従するHUD制御用コンポーネント
using UnityEngine;
/// <summary>
/// uGUIで3D空間のオブジェクト上に追従するHUD制御用コンポーネント
/// </summary>
public class HudControl : MonoBehaviour
{
public Transform targetTrans;
public Vector3 offset = Vector3.zero;