unity3d - how to find unity app icon's guid via script?
问题描述
This is part of ProjectSettings.asset.
m_BuildTargetPlatformIcons:
- m_BuildTarget: Android
m_Icons:
- m_Textures:
- {fileID: 2800000, guid: 646fe89decffe4540babe7ee817c79fb, type: 3}
and I wanna change app icon's guid via script.
private static void ChangeAppIcons()
{
const string ProjectSettingsAssetPath = "ProjectSettings/ProjectSettings.asset";
SerializedObject projectSettings = new SerializedObject(UnityEditor.AssetDatabase.LoadAllAssetsAtPath(ProjectSettingsAssetPath)[0]);
SerializedProperty iter = projectSettings.GetIterator();
while (iter.Next(true))
{
if (iter.name == "m_Textures")
{
// TODO
}
}
projectSettings.ApplyModifiedProperties();
}
according to my script, I can access SerializedProperty which named "m_Textures" but don't know how to access its value.
Or maybe totally wrong way.
how can I do?
解决方案
推荐阅读
- sas - 如何使用 SAS 分析平衡和不平衡面板数据
- c - 链表:按索引获取节点有意外结果
- reactjs - React Hook useEffect 缺少依赖项,在触发状态更改的按钮单击时运行条件
- python - RuntimeError('dot : 期望两个向量具有相同的 dtype,但发现 Double 和 Float
- elasticsearch - Composer 安装错误版本的 ElasticSearch
- c# - 解析异构 JSON 对象
- sql - 如何将 SCOPE_IDENTITY 作为值返回以在 Angular 应用程序中使用
- arrays - 使用 Flutter 中的类解析 JSON 文件
- c++ - 使用哪些数据类型从用户获取字符串,然后将其与数组中的其他字符串进行比较?
- reactjs - Heroku 应用程序给出“status=404”但没有出现