Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is PooledProjectile Component works for Pooled Pawn ?
    I made a missile as a PooledPawn instead of PooledActor because I want it has Hp, player can shoot them down. And make it is a child class of my "EnemyPawnBase".

    I use PooledProjectile in Pooled Actor. It works well. But it does not works in PooledPawn.

    Comment


      Originally posted by skydashstudio View Post
      Is PooledProjectile Component works for Pooled Pawn ?
      No, only if a few C++ lines of code are charged
      Some people do it themselves, but I will take note and add this change when I can.
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        skydashstudio I submitted today an update for Unreal 4.20 where Pooled Projectiles shall support Pooled Pawns (without additional code needed);
        In few days EpicGames should release it to Marketplace.
        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

        Comment


          After I updated plug-in. Pooled Projectile works on my Pooled Pawn. Thank you.

          Comment


            I have tested my game again. Then I noticed something strange. I recorded a demonstration video.

            https://youtu.be/Fwvw99MbHwk

            Function "Deactivate" does not works on Pooled Projectile component.

            When I use function "Deactivate" to normal projectile movement component, they stop moving.

            But when I use function "Deactivate" to Pooled Projectile component, they still moving.
            I use function "Set Direction" to x=0 y=0 z=0 too, But they do not stop moving.

            I also cannot use function "Set velocity" in Pooled Projectile as I use in Projectile Movement component.

            Comment


              Did you try to get the "native" Movement Component from Pooled Projectile and deactivate it?
              There's a node on Pooled Projectile to get the native Component instance from Pooled.
              | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

              Comment


                Thank you for advise, I found a function "Get Projectile Movement Component" from Pooled Projectile.
                Then I can deactivate them. I can also set its velocity as I do for unpooled actors.

                Comment


                  Originally posted by skydashstudio View Post
                  Thank you for advise, I found a function "Get Projectile Movement Component" from Pooled Projectile.
                  Then I can deactivate them. I can also set its velocity as I do for unpooled actors.
                  Great to know it worked!
                  | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    Wait for Unreal 4.21 compatible.

                    Comment


                      Originally posted by skydashstudio View Post
                      Wait for Unreal 4.21 compatible.
                      I will install 4.21 tomorrow at home and will begin porting plugins this weekend.
                      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        I have big problems in writing C++ Code.
                        Even if i take away your Code from the plugin as it is:

                        After i create a Blueprint for my Pool and Projectile C++ class, i cannot build my project anymore, and - after restarting the IDE the blueprints are broken.
                        In fact, it's the Pooled Projectile code, that is broken, and breaks everything, that's attached to it, so if it is used in a pool, it crashes the pool too, and if this pool is used on a map, the whole map is broken and everything must be deleted, before i can restart my ide in any way:

                        The only thing i changed is making the Static Mesh being possible to modify...

                        What's happening ??


                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: begin: stack for UAT
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: === Critical error: ===
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error:
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: Fatal error!
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error:
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001d0
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error:
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa0b5723de UE4Editor-Engine.dll!AActor::SetLifeSpan() [d:\build\++ue4\sync\engine\source\runtime\engine\private\actor.cpp:4466]
                        PackagingResults: Error: begin: stack for UAT
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9ef538fed UE4Editor-OBJPool.dll!UPooledProjectile::PostLoad() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\objectpool\source\objpool\private\pooledprojectile.cpp:49]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa1b423345 UE4Editor-CoreUObject.dll!UObject::ConditionalPostLoad() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1011]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa1b50b7a1 UE4Editor-CoreUObject.dll!EndLoad() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1630]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa1b5262c4 UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1375]
                        PackagingResults: Error: === Critical error: ===
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa1b5254b9 UE4Editor-CoreUObject.dll!LoadPackage() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1471]
                        PackagingResults: Error: Fatal error!
                        PackagingResults: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001d0
                        PackagingResults: Error: [Callstack] 0x00007ffa0b5723de UE4Editor-Engine.dll!AActor::SetLifeSpan() [d:\build\++ue4\sync\engine\source\runtime\engine\private\actor.cpp:4466]
                        PackagingResults: Error: [Callstack] 0x00007ff9ef538fed UE4Editor-OBJPool.dll!UPooledProjectile::PostLoad() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\objectpool\source\objpool\private\pooledprojectile.cpp:49]
                        PackagingResults: Error: [Callstack] 0x00007ffa1b423345 UE4Editor-CoreUObject.dll!UObject::ConditionalPostLoad() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1011]
                        PackagingResults: Error: [Callstack] 0x00007ffa1b50b7a1 UE4Editor-CoreUObject.dll!EndLoad() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1630]
                        PackagingResults: Error: [Callstack] 0x00007ffa1b5262c4 UE4Editor-CoreUObject.dll!LoadPackageInternal() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1375]
                        PackagingResults: Error: [Callstack] 0x00007ffa1b5254b9 UE4Editor-CoreUObject.dll!LoadPackage() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1471]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa09ed0b3c UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::LoadPackageForCooking() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2042]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa09f1553d UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:1651]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa09d87a8d UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:914]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa09db88ff UE4Editor-UnrealEd.dll!UCookCommandlet::Main() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:585]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff77dbbe9c2 UE4Editor-Cmd.exe!FEngineLoop::PreInit() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2322]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff77dbb5968 UE4Editor-Cmd.exe!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:127]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff77dbb5bba UE4Editor-Cmd.exe!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff77dbc3dac UE4Editor-Cmd.exe!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff77dbc4ce6 UE4Editor-Cmd.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa56643034 KERNEL32.DLL!UnknownFunction []
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ffa58fc1471 ntdll.dll!UnknownFunction []
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error:
                        UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: end: stack for UAT
                        PackagingResults: Error: [Callstack] 0x00007ffa09ed0b3c UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::LoadPackageForCooking() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2042]
                        PackagingResults: Error: [Callstack] 0x00007ffa09f1553d UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:1651]
                        PackagingResults: Error: [Callstack] 0x00007ffa09d87a8d UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:914]
                        PackagingResults: Error: [Callstack] 0x00007ffa09db88ff UE4Editor-UnrealEd.dll!UCookCommandlet::Main() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:585]
                        PackagingResults: Error: [Callstack] 0x00007ff77dbbe9c2 UE4Editor-Cmd.exe!FEngineLoop::PreInit() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2322]
                        PackagingResults: Error: [Callstack] 0x00007ff77dbb5968 UE4Editor-Cmd.exe!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:127]
                        PackagingResults: Error: [Callstack] 0x00007ff77dbb5bba UE4Editor-Cmd.exe!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
                        PackagingResults: Error: [Callstack] 0x00007ff77dbc3dac UE4Editor-Cmd.exe!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
                        PackagingResults: Error: [Callstack] 0x00007ff77dbc4ce6 UE4Editor-Cmd.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
                        PackagingResults: Error: [Callstack] 0x00007ffa56643034 KERNEL32.DLL!UnknownFunction []
                        PackagingResults: Error: [Callstack] 0x00007ffa58fc1471 ntdll.dll!UnknownFunction []
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMultiByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMultiForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingle.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingleByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingleForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMulti.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMultiByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMultiForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingle.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingleByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingleForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibraryrawDebugCylinder.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMulti.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMultiByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMultiForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingle.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingleByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingleForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMulti.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMultiByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMultiForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingle.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingleByProfile.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingleForObjects.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or BoolProperty /Script/Landscape.LandscapeSplineConnection:End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.BatchedLine:End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/AIModule.NavLocalGridManager:FindLocalNavigationGridPath.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/FunctionalTesting.FunctionalTestUtilityLibrary:TraceChannelTestUtil.End
                        LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/MeshEditor.OverlayLine:End
                        PackagingResults: Error: end: stack for UAT
                        UATHelper: Packaging (Windows (64-bit)): Took 23,9018561s to run UE4Editor-Cmd.exe, ExitCode=3
                        UATHelper: Packaging (Windows (64-bit)): ERROR: Cook failed.
                        UATHelper: Packaging (Windows (64-bit)): (see C:\Users\YvesT\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\Log.txt for full exception trace)
                        PackagingResults: Error: Cook failed.
                        UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
                        UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
                        PackagingResults: Error: Unknown Cook Failure
                        Attached Files

                        Comment


                          Btw. i see, this is happening with your original C++ Code, too, that's really bad, because it makes me changing a complete concept out of C++ to Blueprint and back to C++ which is really unhandy !!
                          So, what's happening here ?

                          If i take away the original Pool project, make a blueprint out of PlayerBulletRank3, close the project, reopen it, the blueprint is broken, and everything using it is broken, as i said before.
                          I cannot build my project any more, and it destroys about everything, where an object pool might sit, using this Blueprint class...

                          Comment


                            That Component can ONLY be attached to a APooledActor or APooledPawn.
                            You are adding PooledProjectile to something that cannot support it.

                            ​​​​​Anyway, I will move that setup to PostInitProps to avoid this problem.
                            Last edited by BrUnO XaVIeR; 11-08-2018, 09:36 PM.
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              Hi Bruno, I am looking for clarification if possible,
                              I see that pawns and actors once drawn from the pool have physics etc woarking as normal.

                              I have a railway simulator that can up to 100 wagons of any one type, these wagons work purely by physics/ collision they are guided along the track and pushed / pulled with no coding.
                              Would this plugin be suitable ? or is it suitable for projectiles only ?
                              each wagon is a skeletal mesh+ physics asset at the moment they are pawns to enable operations to be carried out on the wagon easily.. ie loading, coupling applying brake etc.
                              but they could be actors if necessary.

                              At present a train of approx 30 wagons gives me a hit of around 12-15 fps nearly all of which is physics doing its thing

                              Your views appreciated

                              Thanks
                              Paul_G

                              Comment


                                @Sly401 Any Actor/Pawn/Character can be turned into pooled ones (just re-parent them to equivalent Pooled parent class).
                                The Pooled Projectile is just an extended Component to make bullets work with pooled classes; it isn't required to be used.

                                But I'm not sure what you want to accomplish, are you constantly spawning and destroying wagon cars?
                                If you don't have to spawn/destroy them constantly, using pooling system won't help you there to save performance.
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X