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
  • Loading one 3D avatar at runtime
  • Loading multiple 3D avatars at runtime
  • Debug panel
  1. Developers (Integration Guide)
  2. Unity Integration
  3. Code examples

Loading 3D Avatars

These examples have been tested in Unity 2020.3LTS and newer versions.

Loading one 3D avatar at runtime

The AvatarLoadingExample.cs script demonstrates how to load one avatar at runtime.

Scene and Code Assets/Samples/Enoch Avatar Loader/1.0.0/AvatarLoading/AvatarLoadingExample

  1. Open and play the AvatarLoadingExample Scene. The example loads an avatar (and includes a Debug Log panel described below).

  2. Open the RuntimeExample.cs script, which loads the avatar as follows.

    • Creates an instance of AvatarLoader: var avatarLoader = new AvatarObjectLoader();

    • Defines the OnCompleted() callback for the AvatarObjectLoader this is called when loading has successfully completed.

    • Adds an Avatar Configuration to the AvatarObjectLoader from Assets > Plugins > ReadyPlayerMe > Resources > Data > AvatarConfigurations.

    • Calls LoadAvatar() with the URL for the avatar to load. This operation will download, import, and load the avatar model into the Scene.

Loading multiple 3D avatars at runtime

This code sample demonstrates how to load multiple avatars at runtime.

Scene and Code Assets/Samples/Enoch Avatar Loader/1.0.0/MultipleAvatarLoading/MultipleAvatarLoadingExample

  1. Open and play the MultipleAvatarLoadingExample Scene. The example loads several avatars (and includes a Debug Log panel described below).

  2. Open the MultipleAvatarLoadingExample.cs script.

    • Notice that there is only one avatar URL.

    • Loading works in the same way as for one avatar and is repeated for every avatar to load.

    • The variations in the avatar are created by using a list of different configurations that are applied in OnCompleted() -> OnAvatarLoaded() after the avatar has been loaded.

Debug panel

Code Assets/Plugins/Enoch/Examples/Runtime Example/Runtime Debug Panel

The Debug Panel displays the avatar loader log output while the Scene is running in the Unity Editor or on a target device.

You can pause or hide the Debug Panel while playing, or select the Runtime Test game object and disable the DebugPanel(Script) component in the Inspector.

The Debug Panel is provided to assist in troubleshooting avatar loading issues on the device. Include the information contained in the log output with any support queries that you submit via our Technical Support channels.

PreviousCode examplesNextLoading 2D Avatars

Last updated 2 years ago

๐Ÿ”ต