{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/unity-vs-unreal/",
  "atlas": "https://www.pystone.net/?node=unity-vs-unreal#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/unity-vs-unreal.md",
  "context": "https://www.pystone.net/notes/unity-vs-unreal.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:unity-vs-unreal",
  "slug": "unity-vs-unreal",
  "title": "Unity-Unreal",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "Unity Unreal",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "82b0dbb6ca8a0cc22928f5639775b389c1748cc393c5daaf00a1ddc5abad2e39",
  "assets": [
    {
      "reference": "assets/Unity-Unreal__Image.png",
      "url": "/media/fc019899c4d01fdea57e.png",
      "mediaType": "image/png",
      "contentHash": "fc019899c4d01fdea57ee584aa86a894c8af6ff365e0169b0870b3f63e7d3012",
      "byteLength": 249738,
      "width": 1362,
      "height": 573
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "Unity-Unreal",
      "anchor": "unity-unreal",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#unity-unreal"
    },
    {
      "depth": 2,
      "text": "Unity->UE 官方",
      "anchor": "unity-ue-官方",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#unity-ue-%E5%AE%98%E6%96%B9"
    },
    {
      "depth": 3,
      "text": "Glossary",
      "anchor": "glossary",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#glossary"
    },
    {
      "depth": 3,
      "text": "Projects and Files",
      "anchor": "projects-and-files",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#projects-and-files"
    },
    {
      "depth": 3,
      "text": "Actor",
      "anchor": "actor",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#actor"
    },
    {
      "depth": 3,
      "text": "Blueprint vs. Prefab",
      "anchor": "blueprint-vs-prefab",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#blueprint-vs-prefab"
    },
    {
      "depth": 3,
      "text": "Component",
      "anchor": "component",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#component"
    },
    {
      "depth": 3,
      "text": "Blueprint or C++?",
      "anchor": "blueprint-or-c",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#blueprint-or-c"
    },
    {
      "depth": 3,
      "text": "Transform Components",
      "anchor": "transform-components",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#transform-components"
    },
    {
      "depth": 3,
      "text": "Actor",
      "anchor": "actor-1",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#actor-1"
    },
    {
      "depth": 3,
      "text": "Gameplay Framework",
      "anchor": "gameplay-framework",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#gameplay-framework"
    },
    {
      "depth": 3,
      "text": "Programming",
      "anchor": "programming",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#programming"
    },
    {
      "depth": 4,
      "text": "Event Functions",
      "anchor": "event-functions",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#event-functions"
    },
    {
      "depth": 4,
      "text": "Unity功能在Unreal中实现",
      "anchor": "unity功能在unreal中实现",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#unity%E5%8A%9F%E8%83%BD%E5%9C%A8unreal%E4%B8%AD%E5%AE%9E%E7%8E%B0"
    },
    {
      "depth": 5,
      "text": "Physics: RigidBody vs. Primitive Component",
      "anchor": "physics-rigidbody-vs-primitive-component",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#physics-rigidbody-vs-primitive-component"
    },
    {
      "depth": 5,
      "text": "Input events",
      "anchor": "input-events",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#input-events"
    },
    {
      "depth": 4,
      "text": "Exception",
      "anchor": "exception",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#exception"
    },
    {
      "depth": 2,
      "text": "Unity->UE经验博客",
      "anchor": "unity-ue经验博客",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#unity-ue%E7%BB%8F%E9%AA%8C%E5%8D%9A%E5%AE%A2"
    },
    {
      "depth": 3,
      "text": "Actor Lifecycle",
      "anchor": "actor-lifecycle",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#actor-lifecycle"
    },
    {
      "depth": 4,
      "text": "销毁对象",
      "anchor": "销毁对象",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#%E9%94%80%E6%AF%81%E5%AF%B9%E8%B1%A1"
    },
    {
      "depth": 3,
      "text": "Garbage Collection",
      "anchor": "garbage-collection",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#garbage-collection"
    },
    {
      "depth": 4,
      "text": "Advanced GC",
      "anchor": "advanced-gc",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#advanced-gc"
    },
    {
      "depth": 3,
      "text": "对象查找",
      "anchor": "对象查找",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#%E5%AF%B9%E8%B1%A1%E6%9F%A5%E6%89%BE"
    },
    {
      "depth": 3,
      "text": "Referencing Assets",
      "anchor": "referencing-assets",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#referencing-assets"
    },
    {
      "depth": 3,
      "text": "Actor与蓝图的加载、生成",
      "anchor": "actor与蓝图的加载生成",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#actor%E4%B8%8E%E8%93%9D%E5%9B%BE%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%94%9F%E6%88%90"
    },
    {
      "depth": 3,
      "text": "资源路径",
      "anchor": "资源路径",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#%E8%B5%84%E6%BA%90%E8%B7%AF%E5%BE%84"
    },
    {
      "depth": 2,
      "text": "Unreal vs. Unity",
      "anchor": "unreal-vs-unity",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#unreal-vs-unity"
    },
    {
      "depth": 2,
      "text": "Ref",
      "anchor": "ref",
      "citation": "https://www.pystone.net/notes/unity-vs-unreal/#ref"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "Unreal中的“Unity-Unreal”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#unreal"
    }
  ],
  "contentMarkdown": "# Unity-Unreal\n\n﻿# Unity->Unreal\n\n> 创建时间：2021/12/15 16:27\n\n* Unity->UE 官方\n    * Glossary\n    * Projects and Files\n    * Actor\n    * Blueprint vs. Prefab\n    * Component\n    * Blueprint or C++?\n    * Transform Components\n    * Actor\n    * Gameplay Framework\n    * Programming\n      * Event Functions\n      * Unity功能在Unreal中实现\n        * Physics: RigidBody vs. Primitive Component\n        * Input events\n      * Exception\n  * Unity->UE经验博客\n    * Actor Lifecycle\n      * 销毁对象\n    * Garbage Collection\n      * Advanced GC\n    * 对象查找\n    * Referencing Assets\n    * Actor与蓝图的加载、生成\n    * 资源路径\n  * Unreal vs. Unity\n  * Ref\n\n可以通过Unity那边的概念、结构、操作方式来理解Unreal。但是又不能完全类比，不能期待一方中的操作方法在另一方里面一定有，如果完全一致的话，两个就变成同一个引擎了。接近本质的点上可以对照去看，比如序列化、反序列化，比如内存管理、资源管理等，是独立于引擎的，都要有的。而上层的、操作习惯上的点就不能一一对照了。\n\n## Unity->UE 官方\n\n### Glossary\n\nUnity -> Unreal\n\n* * *\n\nPrefab -> Blueprint Class\nMesh -> Static Mesh\nSkinned Mesh -> Skeletal Mesh\nShader -> Material, Material Editor\nMaterial -> Material Instance\nMaterial Instance -> ?\nSprite -> EditorPaper2D\nMecanim -> Persona , Animation Blueprint\nUI -> UMG (Unreal Motion Graphics)\n\nRaycast -> Line Trace, Shape Trace\n\nRigid Body -> Collision, Physics\n\n### Projects and Files\n\nContent - Assets\n\nMap file - Scene, Map files store data about your Level and the objects in it, as well as lighting data and certain level-specific settings.\n\nEdit->Project Settings->Platforms->Android/... - \"player settings\" in Unity\n\nSource sub-folder -\n\n### Actor\n\nIn Unity, GameObject is C# class which you cannot directly extend.\nIn UE4, Actor is a C++ class which you can extend and customize using inheritance.\n\n  * 任意可以被放置到关卡中的游戏物体都是一个 Actor\n\n  * Actor 可以被认为维系了一些特殊 Object 的容器，这些特殊 Object 被称为组件（Component）\n\n  * Actor像是Prefab一样，可以在场景中实例化多个，当Actor进行了修改，那么场景中的物体会同样被修改\n\n### Blueprint vs. Prefab\n\nUE4中，Unity的Prefab使用Blueprint Class替代。Blueprint Class支持继承，修改公共的Function很方便。\n\n蓝图-Code挂Asset\nPrefab-Asset挂code\n\n### Component\n\nBeginPlay = Initialize Component = Unity Start()\nTick Component = Unity Update\n\n### Blueprint or C++?\n\nMost projects will use a mix of Blueprints and C++. Many developers prototype game functionality using Blueprints, because it is so easy and fun, and later move some or all of it to C++ for performance and engineering rigor.\n\n### Transform Components\n\nRoot Component - any subclass of Scene Component\n\nA Scene Component gives the Actor a location, rotation, and scale in the world which is applied hierarchically to all components underneath it.\n\n### Actor\n\nActors are most common class used for gameplay in UE4 and the only type that can be Spawned into the World. So everything you place in your level will be an Actor.\n\nObject is actually the base class of all Unreal classes, including Actor and many others.\n\n### Gameplay Framework\n\nhttps://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Framework/\ncustomized built-in Actor classes\nreplication and networking features\n\n### Programming\n\n#### Event Functions\n\nRemember, in UE4 it is important to call the parent class' version of method.\n\nA - Actor sub-class\nU - Object sub-class\nF - plain data structures or non-UObject classes\n\n#### Unity功能在Unreal中实现\n\n文档中查阅：https://docs.unrealengine.com/4.27/en-US/Basics/UnrealEngineForUnityDevs/\n\nInstantiating GameObject / Spawning Actor\nCasting from One Type to Another\n\nDestroying GameObject / Actor\nDestroying GameObject / Actor (With 1 Second Delay)\nDisabling GameObjects / Actors\n\nAccessing the GameObject / Actor from a Component\nAccessing a Component from the GameObject / Actor\nFinding GameObjects / Actors\nAdding tags to GameObjects / Actors\nAdding tags to MonoBehaviours / ActorComponents\nComparing tags on GameObjects / Actors and MonoBehaviours / ActorComponents\n\n##### Physics: RigidBody vs. Primitive Component\n\nLayers vs Channels\nRayCast vs RayTrace\nTriggers\n\nKinematic Rigidbodies\n\n##### Input events\n\nEngine-Input\n\n#### Exception\n\ncheck() - You can pass in an error message.\nensure() - log an error with a full call stack\n\n## Unity->UE经验博客\n\n### Actor Lifecycle\n\nhttps://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/ActorLifecycle/\nDestroy\nEndPlay\nOnDestroy - 不要用这个，要用EndPlay\n\n#### 销毁对象\n\n```xml\npublic class AGenericClass&lt;T&gt; where T : IComparable&lt;T&gt; { }\n\n```\n\n### Garbage Collection\n\n#### Advanced GC\n\nClustering -: builds clusters of objects that are all destroyed together\n\nCluster Merging - For example, a particle system asset may reference a material asset, but if cluster merging is turned off, the material and the particle system will remain in separate clusters for garbage collection purposes. With cluster merging turned on, the particle asset cluster will be merged with the material cluster due to the particle system referencing the material.\n\n### 对象查找\n\n```xml\npublic class AGenericClass&lt;T&gt; where T : IComparable&lt;T&gt; { }\n\n```\n\n### Referencing Assets\n\nDirect Property Reference\nConstruction Time Reference\nIndirect Property Reference\n\n### Actor与蓝图的加载、生成\n\n```xml\npublic class AGenericClass&lt;T&gt; where T : IComparable&lt;T&gt; { }\n\n```\n\n### 资源路径\n\n![](assets/Unity-Unreal__Image.png)\n\n目前UE4采用每个资源一个包，以前UE3和UE2时代，一个包中可以有多个资源对象，因此现在包名和资源名都是一样的，除非有手动重命名过。\n\n```xml\npublic class AGenericClass&lt;T&gt; where T : IComparable&lt;T&gt; { }\n\n```\n\n## Unreal vs. Unity\n\n## Ref\n\nhttps://zhuanlan.zhihu.com/p/444044071\n"
}
