
Unity
Flyforever-Tang
这个作者很懒,什么都没留下…
展开
-
Unity:使用Texture2D动态创建的图像无法正常显示 / 修改图像后未生效
经过测试,图像并没有被正常显示出来。经过查阅官方文档,调用SetPixels32后必须调用Apply函数把修改上传到显卡中才能生效原创 2024-06-24 16:23:20 · 707 阅读 · 0 评论 -
Unity 根据组件名称获得组件(Component)
using System.Reflection;using UnityEngine;using System;public static object GetComponentByName(GameObject targetGameObject, string componentName){ Type componentType = Type.GetType(componentName); object component = targetGameObject.GetCompone原创 2021-12-05 20:18:29 · 4274 阅读 · 0 评论