Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include "Engine/Classes/Components/StaticMeshComponent.h"
- #include "Engine/Classes/Components/InstancedStaticMeshComponent.h"
- #include "Populate_CPP_Spawner.h"
- #include "Populate_CPP_Worker.generated.h"
- UCLASS()
- class ORVILLETREK_API APopulate_CPP_Worker : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- APopulate_CPP_Worker();
- // Spawner
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate")
- APopulate_CPP_Spawner* PopulateSpawner;
- // Set Mesh
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate")
- UStaticMesh * StaticMesh;
- // Transform
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate")
- FTransform Transformation;
- // Transform
- UFUNCTION(BlueprintCallable, Category = "Populate")
- virtual void CreateWorkerInstance();
- // Transform
- UFUNCTION(BlueprintCallable, Category = "Populate")
- virtual void AddInstance();
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- private:
- //private
- AActor * InstancedActor;
- // Instance Static Mesh Component
- UInstancedStaticMeshComponent* InstancedStaticMeshComponent;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement