VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Editor & Project·Up to Community Snippets · Editor & Project

Simple Custom Streaming in UEFN

0846 Views

Report

  • 
    using { /Fortnite.com/Devices }
    using { /Fortnite.com/Characters }
    using { /Verse.org/Simulation }
    using { /UnrealEngine.com/Temporary/Diagnostics }
    using { /UnrealEngine.com/Temporary/SpatialMath }
    
    # See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
    
    my_debug_draw := class(debug_draw_channel) {}
    
    # A Verse-authored creative device that can be placed in a level
    Prop_Manager := class(creative_device):
    
        DebugDraw:debug_draw = debug_draw{Channel := my_debug_draw}
        
        @editable Props : []PropClass = array{}
        @editable SpawnRange : float = 500.0
        # Runs when the device is started in a running game
        OnBegin<override>()<suspends>:void=
            loop:
                Sleep(1.0)
                AllPlayers := GetPlayspace().GetPlayers()
                for (Agent : AllPlayers):
                    if:
                        FortChar := Agent.GetFortCharacter[]
                        FortCharLoc : vector3 = FortChar.GetTransform().Translation
                    then:
                        DebugDraw.DrawSphere(Center := FortCharLoc, ?DrawDurationPolicy := debug_draw_duration_policy.FiniteDuration, ?Duration := 1.0, ?Radius := SpawnRange)
                        for(X:= 0..Props.Length):
                            if:
                                PropStruct := Props[X]
                                PropLocation : vector3 = PropStruct.Location
                            then:
                                    Dist : float = Distance(FortCharLoc, PropLocation)
                                    if(Dist < SpawnRange and PropStruct.ExistsInWorld = false):
                                        PropProp : creative_prop_asset = PropStruct.Prop
                                        SpawnedProp := SpawnProp(PropProp, PropLocation, PropStruct.Rotation)
                                        if (CreativeProp := SpawnedProp(0)?):
                                            if(set Props[X].WorldProp = CreativeProp):
                                                if(set Props[X].ExistsInWorld = true):
                                                    Print("Added")
                                    else if(Dist > SpawnRange and PropStruct.ExistsInWorld = true):
                                        if(Prop : creative_prop = Props[X].WorldProp):
                                            Prop.Dispose()
                                            if(set Props[X].ExistsInWorld = false):

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Source

Epic Games documentation

View original

Last updated 2026-07-26T12:20:32.451014+00:00

VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

🦜

Scout · your island guide

The Isle of Verse