Enoch
  • The Vision
    • ๐ŸŽฏOur Mission
    • ๐Ÿ•ต๏ธโ€โ™‚๏ธWho we are
    • ๐ŸŽ‡What problem are we Tackling?
  • Enoch Introduction
    • ๐ŸŽฏIntro to Enoch
    • ๐Ÿš€Stargate App
    • ๐Ÿ›’3D Marketplace App
  • Roadmap
    • ๐Ÿ—“๏ธRoadmap
  • Enoch platform
    • ๐ŸซProduct categories
  • Create
    • ๐ŸคPosts
    • ๐Ÿซ‚Community
    • ๐ŸŒ†Event
    • ๐Ÿง˜โ€โ™€๏ธNFT
    • ๐ŸŒSphere
    • ๐Ÿคพโ€โ™‚๏ธReel
    • ๐ŸŽถProfessional Page
    • ๐Ÿ”ˆGroups
    • ๐ŸŽŸ๏ธJob
    • ๐ŸŒค๏ธAd
  • PERSONAL
    • ๐Ÿ’ธMonetization
    • ๐Ÿ’ฐWallet
    • ๐Ÿ’ณGiftcard
    • ๐Ÿ“…Calendar
    • ๐Ÿงšโ€โ™‚๏ธRanking
    • โญBadges
    • ๐ŸŽŸ๏ธDaily Missions
    • ๐Ÿ’ฐPricing
    • ๐ŸงพBilling
    • ๐ŸคAffiliate
  • Social
    • ๐Ÿ“ฒHome Feed
    • ๐Ÿ‘จโ€๐ŸŽ“User Profile
    • โ–ถ๏ธMedia Content
    • โšกMessenger
    • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘My Network
    • ๐Ÿง˜โ€โ™€๏ธCommunity
    • ๐ŸŽถEvents
    • ๐ŸŽŸ๏ธLive-Zone
    • ๐Ÿ”ˆSphere
    • ๐Ÿ“ƒProfessional Pages
    • ๐ŸŒค๏ธNews Feed
  • Creative
    • โ›ฉ๏ธIntroduction
    • ๐Ÿ‘ฉโ€๐ŸŽจCreator Portals
    • ๐ŸŽ™๏ธfantasy Studio
      • My Avatars
      • Meridian
      • Magic Tools
        • Journal
        • Inventory
        • Shop
        • Avatar
      • Gallery
    • ๐ŸŽนEnoch Studio
  • Shopping
    • ๐Ÿ“ŠEnoch 3D Marketplace
    • ๐Ÿ›๏ธSeller's Shops
  • Find Work
    • ๐Ÿ’ผJobs
  • Developers (Integration Guide)
    • ๐Ÿ‘พOverview
    • ๐ŸŸFish Hub
    • ๐Ÿค–Avatar Creator Setup
      • Avatar URLs
      • Avatar codes
    • ๐Ÿ”ตUnity Integration
      • Quick start
      • Load Avatars
      • Avatar Creator Integration
        • Android and iOS
        • VR and PC
        • WebGL
      • Optimize
        • Avatar Configuration
        • Avatar Caching
      • Code examples
        • Loading 3D Avatars
        • Loading 2D Avatars
        • Avatar Creator ( WebGL)
        • Avatar Creator (Desktop)
        • Avatar Creator (Mobile)
        • Distance-based LODs
      • Troubleshooting
        • Avatar loading issue
        • iOS issues
        • WebGL issues
        • Firewall issues
      • Help us improve the Unity SDK
      • FAQs for Unity
    • โšกUnreal Engine Integration
      • Quick start
      • Load Avatars
      • Avatar Creator Integration
        • Android and iOS
        • VR and PC
        • WebGL
      • Optimize
        • Avatar Configuration
        • Avatar Caching
      • Code examples
        • Loading 3D Avatars
        • Loading 2D Avatars
        • Avatar Creator ( WebGL)
        • Avatar Creator (Desktop)
        • Avatar Creator (Mobile)
        • Distance-based LODs
      • Troubleshooting
        • Avatar loading issue
        • iOS issues
        • WebGL issues
        • Firewall issues
      • Help us improve the Unity SDK
      • FAQs for Unity
    • ๐Ÿ•ธ๏ธWeb & native Integration
      • Quick start
      • Code examples
      • Common errors
  • Enoch Advertising
    • ๐ŸŽŸ๏ธAd Manager
    • โญEnoch Ad
  • Settings
    • ๐Ÿ”’Your Private Profile
    • โš™๏ธYour Account
  • Open Finance
    • ๐Ÿ“–Dashboard
    • ๐Ÿ“ˆTrade
      • Paradigm Swap
      • Paradigm Liquidity Pool
      • Paradigm Bridge
    • ๐Ÿ”ฎFinancial Pools
      • Ranking Pools
      • Daily Missions Pools
      • Cerberus Pools
      • Trinity Pools
      • Prometheus Pools
      • Lazarus Pools
  • Enochian Party Program
    • ๐ŸคธIntro to Enochian Party Pass
    • ๐Ÿ›ซParty beginnerโ€™s guide
    • ๐Ÿ„Enochian Season
    • ๐ŸŽ‰Party Pass Guide
    • ๐ŸบParty Pass Benefits
    • ๐Ÿ“ถParty FIND ANSWERS
    • ๐ŸคบNinja Warrior 3D Collectectibles
    • ๐ŸƒArk Of Convenent
  • Yokai Air Drop
    • ๐ŸคธIntro to Yokia Air drop
    • ๐Ÿ„Meet the yokai mythical creatures
    • ๐Ÿ›ซYokai beginnerโ€™s guide
    • ๐ŸŽ‰Yokai Air drop Guide
    • ๐Ÿ“ถYokai Find Answer
    • โœ–๏ธYokai Mutation
  • TECHNOLOGY
    • ๐Ÿฆธโ€โ™‚๏ธWeb 2.0 Protocols
    • ๐Ÿฆธโ€โ™‚๏ธWeb 3.0 Protocols
      • Metatron
      • Uriel
      • ZK Rollups
    • ๐Ÿ—๏ธWeb 3.0 Smart Contracts
      • Dual Token
      • Stargate
      • 3D MarketPlace
      • Financial Pool
      • Yokia AirDrop
      • Enochian Party Pass
    • ๐Ÿค–Atlantis A.I engine
      • Feature
        • Text-to-Speech
        • Evie-Chat-Assistant
        • Video-Animation
        • Text-To-3D
        • Text-to-Image
        • Text-to-Video
        • Text-To-Music
        • Torus
        • 2d to 3D
      • Evie Chat Assistance
    • โ˜๏ธCloud Infrastructure
  • API references
    • โ›“๏ธEnoch Rest APIs
      • Access and Authentication
      • Response codes & types
      • GET - 3D Avatars
      • GET - 2D Avatars
      • GET - Metadata
      • Changelog
    • ๐Ÿ”ตUnity SDK
      • AvatarCache
      • AvatarConfig
      • AvatarObjectLoader
      • AvatarRenderLoader
      • WebView
      • SDKLogger
      • Changelog
    • โšกUnreal Engine SDK
      • AvatarObjectLoader
      • AvatarRenderLoader
      • Actor
      • Component
      • MemoryCache
      • Setting
      • BlueprintLibrary
      • FunctionLibrary
      • AvatarConfig
      • Changelog
  • Investment
    • ๐Ÿ“ˆMetanomics
    • ๐Ÿช™Dual Token Model
    • ๐Ÿ’ฒEnoch Yield Farming
    • ๐Ÿ’ธ$ENOCH Investor benefits
    • โ”FAQ
  • Enoch Ecosystem & Functions
    • ๐ŸงชEnoch Labs
    • ๐Ÿ’นHow to earn income in Enoch
    • ๐Ÿ‘ฝSocial Fi
      • Ranking Pools
      • Daily Missions
    • ๐Ÿ’ธSocial Monetization
      • Live Gifting
      • Uriel Gifting
      • Premium Content
      • Seller Shop
      • Ranking
      • Daily Mission Prizes
      • Drops
  • Payment Gateway
    • ๐ŸฌPayment Gateway
  • Team
    • โญTeams
  • ENOCH TUTORIALS
    • ๐Ÿ‘ฅSocial
      • Profile Setup
    • ๐Ÿ›๏ธShopping
      • Setting up your Shop
    • ๐ŸŽ—๏ธCreative
      • ๐Ÿ‘˜Becoming a 3D artist
    • ๐Ÿ’ŽOpen Finance
      • Staking Pools
      • DEX
      • Love and Enoch
  • KNOW US MORE
    • โ›‘๏ธSupport and Safety
Powered by GitBook
On this page
  • Load 3D Avatars
  • Load 2D Avatars
  • Save avatars as NPCs in your project
  1. Developers (Integration Guide)
  2. Unreal Engine Integration

Load Avatars

PreviousQuick startNextAvatar Creator Integration

Last updated 2 years ago

In this guide, you learn how to load avatars into your Unity Scenes.

Load 3D Avatars

You can load full-body and half-body avatars into your Unity game. For both types of avatars you can follow the same procedure.

  1. Create an instance of the AvatarObjectLoader.

  2. Call the LoadAvatar() method with an avatar URL. The example uses a URL from the demo Avatar Creator https://demo.enoch-avatar.app. You will later learn how to retrieve an Avatar URL directly in your game.

var avatarUrl = "https://api.enoch-avatar.app/v1/avatars/632d65e99b4c6a4352a9b8db.gltf";
AvatarObjectLoader avatarLoader = new AvatarObjectLoader();
avatarLoader.LoadAvatar(AvatarURL); 

3. Receive the GameObject of the avatar in CompletionEventArgs of the OnCompleted callback.

See the code below for the completed example. See the for a complete list of callbacks of the AvatarLoader.

You can also find the code below in the Assets\Plugins\Enoch Avatars\Examples\Runtime Example\RuntimeExampleScene and script.

using Enoch.AvatarLoader;
using Enoch.Core;
using UnityEngine;

namespace Enoch
{
    public class AvatarLoadingExample : MonoBehaviour
    {
        //Demo Avatar URL
        [SerializeField]
        private string avatarUrl = "https://api.enoch-avatar.app/v1/avatars/632d65e99b4c6a4352a9b8db.gltf";

        private GameObject avatar;

        private void Start()
        {
            ApplicationData.Log();
            var avatarLoader = new AvatarObjectLoader();
            avatarLoader.OnCompleted += (_, args) =>
            {
                avatar = args.Avatar;
                AvatarAnimatorHelper.SetupAnimator(args.Metadata.BodyType, avatar);
            };
            avatarLoader.LoadAvatar(avatarUrl);
        }

        private void OnDestroy()
        {
            if (avatar != null) Destroy(avatar);
        }
    }
}

Load 2D Avatars

You can load a 2D render of your avatar using the AvatarRenderLoader class which obtains a rendered image of your avatar via the Render API.

  1. Create an instance of AvatarRenderLoader.

  2. Call the LoadRender() method, passing the required arguments.

AvatarRenderLoader avatarRenderLoader = new AvatarRenderLoader();
avatarRenderLoader.LoadRender(url, scene, blendShapeMesh, blendShapes);

You can find a complete example usage of this code in the Assets/Samples/Enoch Avatar Loader/1.0.0/AvatarLoading/AvatarLoadingExample scene and script.

Save avatars as NPCs in your project

The easiest way to save avatars in your project and package them with your build is using the Avatar Loader.

The Avatar Loader lets you download and save an avatar in your project in the Unity Editor.

  1. Paste your avatar URL (or code) into the Avatar URL or code field.

  2. Optionally, check Use Eye Animations. This will add a component to the avatar GameObject.

  3. Optionally, check Voice To Animation. This will add a component to the avatar GameObject.

  4. Click Load Avatar into the Current Scene.

  5. Your avatar loads into the current Scene at position (0,0,0).

See the code below for a complete example. See the to learn more about AvatarRenderLoader and the function arguments.

Launch the Avatar Loader window by choosing Enoch Avatars > Avatar Loader.

The avatar prefab is stored in a new folder (name = avatar ID) in Assets > Avatars.

โšก
AvatarRenderLoader API Reference
API Reference
Load 3D Avatars
Load 2D Avatars
Save Avatars in your Unity Project