Announcement

Collapse
No announcement yet.

Particle Text Plugin

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

  • [SUPPORT] Particle Text Plugin

    Support thread for this the Particle Text plugin located here: https://www.unrealengine.com/marketplace/particle-text
    Issues or questions? Ask away.

    Update [2017-06-23]: Version 1.0.1 is live!

    Releases:
    1.0.1
    * Fixed - Crash when cooking ParticleTextParamComponent in 4.14 and 4.15
    * Fixed - Crash when calling SetParam functions on a ParticleTextParamComponent in cooked builds

    1.0 Initial Release
    Last edited by matt.longest; 06-23-2017, 10:22 AM.

    Killer Refresh Entertainment | UE4 Particle Text Plugin

  • #2
    I Create Empty Project to 4.15.1 Release Version. And I Tested to Cook. So I Can See Cook Fail When I Use ParticleTextParamComponent in blueprint.

    Comment


    • #3
      Thanks, I'll take a look

      Killer Refresh Entertainment | UE4 Particle Text Plugin

      Comment


      • #4
        Are You Seriously Tested To Build?? I Try Build Your Tutorial Project But isn't Work...

        Comment


        • #5
          EDIT: Sorry, one more change for a runtime issue:
          change
          if (!CanvasWriter && !HasAnyFlags(RF_ClassDefaultObject))
          to
          if (!CanvasWriter && !HasAnyFlags(RF_ClassDefaultObject | RF_NeedLoad))

          vasio: Thanks for pointing this out!
          I'll be submitting a fix to Epic shortly.
          In the meantime, could you change line 54 in ParticleTextParamComponent
          from:
          if (!GetWorld()->IsGameWorld())
          to:
          if (!GetWorld()->IsGameWorld() && !GIsCookerLoadingPackage)

          I had tested packaging in 4.16, but not in 4.14/4.15.
          Last edited by matt.longest; 06-17-2017, 03:06 PM.

          Killer Refresh Entertainment | UE4 Particle Text Plugin

          Comment


          • #6
            In order to use a ParticleTextParamComponent in C++, I had to edit ParticleTextParamComponent.h

            This:
            class UParticleTextParamComponent : public USceneComponent

            Changed to:
            class PARTICLETEXT_API UParticleTextParamComponent : public USceneComponent

            And then it worked.

            Thanks!

            Comment


            • #7
              I've submitted a fix to Epic for packaging ParticleTextParamComponents in 4.14/4.15 and for a crash in Packaged builds with changing params on the ParticleTextParamComponent at runtime in all versions.
              vasio: I've sent you a PM with a patch for the source files that should get you up and running.
              jvukovich: thanks for pointing this out, I've included it in the update as well.

              If anyone else wants the patch ahead of the release, send me a PM.

              Thanks everyone!

              Killer Refresh Entertainment | UE4 Particle Text Plugin

              Comment


              • #8
                Cool, thanks!

                With that said, I could not, for the life of me, get the particle text to change when calling SetTextParam() in C++. I created a standard particle component and attached it to my actor. I then created a ParticleTextParamComponent and attached that to my standard particle component. I created/initialized both and setup properties in my actor constructor. I checked my settings by creating a Blueprint class with a parent class of my C++ actor. All the settings in the Blueprint reflected what I did in C++.

                But, when I'd try it in-game, none of the settings took effect.

                I deleted all my code over the weekend and have fallen back on creating separate standalone particle effects with static text for what I need right now. But, thought I would share my experience.

                Thanks!

                Comment


                • #9
                  jvukovich: do you have a small test project you could zip up and send my way? I'd be happy to take a look.

                  Killer Refresh Entertainment | UE4 Particle Text Plugin

                  Comment


                  • #10
                    Sure thing, I put one together today. Here you go: https://www.odrive.com/s/d90b786a-40...03d7d-59572efd

                    There should be a cube in the map. Just shoot it and it fires an OnHit() event. The particle text is being set to a new random value on every hit, but, as you'll see, it does not show it when the particle is created.

                    I could be doing something wrong?

                    It was built on UE4 4.15.2. Thanks!

                    Comment


                    • #11
                      Ah, the main problem was that you were using UGameplayStatics::SpawnEmitterAtLocation, which only spawns the emitter and not a new paramcomponent.
                      To preserve the paramcomponent->emitter relationship, you need to make a new actor type with that hierarchy defined like so:
                      You'd probably want some code to auto-destroy the AMyProjectDemoHitEffect actor after a delay, too, but that should be fairly trivial...

                      Code:
                      #pragma once 
                      #include "ParticleText/Public/ParticleTextParamComponent.h"
                      #include "MyProjectDemoOnHitActor.generated.h"
                      
                      UCLASS()
                      class AMyProjectDemoOnHitActor : public AActor
                      {
                      	GENERATED_BODY()
                      
                      public:
                      	AMyProjectDemoOnHitActor();
                      
                      	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = PrimaryStaticMesh, meta = (AllowPrivateAccess = "true"))
                      	UStaticMeshComponent* StaticMesh;
                      
                      	UFUNCTION()
                      	void OnHit(UPrimitiveComponent* ThisComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
                      };
                      
                      UCLASS()
                      class AMyProjectDemoHitEffect : public AActor
                      {
                      	GENERATED_BODY()
                      
                      public:
                      	AMyProjectDemoHitEffect();
                      
                      	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = ParticleText, meta = (AllowPrivateAccess = "true"))
                      	UParticleTextParamComponent* DemoParticleTextParamComponent;
                      };
                      Code:
                      #include "MyProject.h"
                      #include "MyProjectDemoOnHitActor.h"
                      
                      AMyProjectDemoOnHitActor::AMyProjectDemoOnHitActor()
                      {
                      	StaticMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMesh"));
                      	StaticMesh->SetSimulatePhysics(true);
                      	StaticMesh->SetEnableGravity(true);
                      	StaticMesh->SetMassOverrideInKg(TEXT(""), 1000.f, true);
                      	StaticMesh->bGenerateOverlapEvents = true;
                      	StaticMesh->OnComponentHit.AddDynamic(this, &AMyProjectDemoOnHitActor::OnHit);
                      	StaticMesh->BodyInstance.SetCollisionProfileName(TEXT("PhysicsActor"));
                      	StaticMesh->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
                      }
                      
                      void AMyProjectDemoOnHitActor::OnHit(UPrimitiveComponent* ThisComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
                      {
                      	auto CurrentPlayer = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);
                      	auto LookAtPlayerRotation = FRotationMatrix::MakeFromX(CurrentPlayer->GetActorLocation() - GetActorLocation()).Rotator();
                      
                      	AMyProjectDemoHitEffect* Effect = GetWorld()->SpawnActor<AMyProjectDemoHitEffect>(AMyProjectDemoHitEffect::StaticClass(), GetActorLocation(), LookAtPlayerRotation);
                      	
                      	if (Effect != nullptr)
                      	{
                      		auto RandomText = FString::Printf(TEXT("Test %d"), FMath::RandRange(1, 4));
                      		Effect->DemoParticleTextParamComponent->SetParamText(RandomText);
                      		GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor(168.f, 252.f, 0.f), FString::Printf(TEXT("OnHit(): SetParamText() to %s"), *RandomText));
                      	}
                      }
                      
                      AMyProjectDemoHitEffect::AMyProjectDemoHitEffect()
                      {
                      	static ConstructorHelpers::FObjectFinder<UParticleSystem> DemoParticleComponentRef(TEXT("Demo'/Game/Demo/P_Demo.P_Demo'"));
                      	UParticleSystemComponent* DemoParticleComponent = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("DemoParticleComponent"));
                      
                      	if (DemoParticleComponentRef.Succeeded())
                      	{
                      		DemoParticleComponent->SetTemplate(DemoParticleComponentRef.Object);
                      		DemoParticleComponent->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
                      	}
                      
                      	DemoParticleTextParamComponent = CreateDefaultSubobject<UParticleTextParamComponent>(TEXT("DemoParticleTextParamComponent"));
                      	DemoParticleTextParamComponent->AttachToComponent(DemoParticleComponent, FAttachmentTransformRules::KeepRelativeTransform);
                      }

                      Killer Refresh Entertainment | UE4 Particle Text Plugin

                      Comment


                      • #12
                        Ah ha, thank you Matt! Everything is working perfectly now. Thanks again!

                        Comment


                        • #13
                          Hello Matt.
                          We are a very small team and working on a project via git.
                          The plugins we are using are usually project plugins. So, they come with the project and when I buy something on the market, every one get it through the git.
                          But your plugins is an engine one... How does it works in that case ?

                          Should every member of the team buy the plugin or is it a way to share it through the project ?
                          Can I share the plugins with other team members ?
                          If not, Can we use some place holder in the engine of team members that doesn't own the plugins and keep it in the building engine only ?
                          Sauvage's twitter - #freeNeoFur

                          Comment


                          • #14
                            Originally posted by JoGoiA View Post
                            Hello Matt.
                            We are a very small team and working on a project via git.
                            The plugins we are using are usually project plugins. So, they come with the project and when I buy something on the market, every one get it through the git.
                            But your plugins is an engine one... How does it works in that case ?

                            Should every member of the team buy the plugin or is it a way to share it through the project ?
                            Can I share the plugins with other team members ?
                            If not, Can we use some place holder in the engine of team members that doesn't own the plugins and keep it in the building engine only ?
                            Apologies for the very late response! For some reason, I didn't get an email notification for your message, even though I'm subscribed to this thread.
                            Here's an answerhub page that goes over the issue of sharing plugins:
                            https://answers.unrealengine.com/que...in-a-team.html
                            Basically, your team does not need to each individually purchase the plugin. If you copy the plugin from your Engine/Plugins/Marketplace folder into your <projectname>/Plugins folder, you should be able to then check it into your git repo and share it with everyone.

                            Killer Refresh Entertainment | UE4 Particle Text Plugin

                            Comment


                            • #15
                              Excellent !
                              I'm happy you're Ok with this, Thanks a lot
                              Last edited by JoGoiA; 09-21-2017, 12:06 AM.
                              Sauvage's twitter - #freeNeoFur

                              Comment

                              Working...
                              X