如何从维护其组件和属性的服务器加载 Unity 中的游戏对象?
How to load a Gameobject in Unity from a server maintaining its components and properties?
我正在 Unity 中开发 GameObject
,我想要的是 GameObject
应该从服务器下载 link 维护其所有引用和组件,以便它应该执行离线执行的方式。
这样做的目的是我想减小应用程序的大小,从而让用户可以选择是否下载游戏对象。
您可能正在寻找 Prefabs,它将允许您使用所有引用保护游戏对象。
Unity has a Prefab asset type that allows you to store a GameObject object complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. Any edits made to a prefab asset are immediately reflected in all instances produced from it but you can also override components and settings for each instance individually.
可以从您的服务器 AssetBundles 中提供这些预制件,以便轻松地重新集成到您的游戏中
AssetBundles have been designed to simplify downloading content to your application. They can contain any kind of Asset type recognized by Unity, as determined by the filename extension. If you want to include files with custom binary data, they should have the extension “.bytes”. Unity will import these files as TextAssets.
我正在 Unity 中开发 GameObject
,我想要的是 GameObject
应该从服务器下载 link 维护其所有引用和组件,以便它应该执行离线执行的方式。
这样做的目的是我想减小应用程序的大小,从而让用户可以选择是否下载游戏对象。
您可能正在寻找 Prefabs,它将允许您使用所有引用保护游戏对象。
Unity has a Prefab asset type that allows you to store a GameObject object complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. Any edits made to a prefab asset are immediately reflected in all instances produced from it but you can also override components and settings for each instance individually.
可以从您的服务器 AssetBundles 中提供这些预制件,以便轻松地重新集成到您的游戏中
AssetBundles have been designed to simplify downloading content to your application. They can contain any kind of Asset type recognized by Unity, as determined by the filename extension. If you want to include files with custom binary data, they should have the extension “.bytes”. Unity will import these files as TextAssets.