x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I use TCircularBuffer?

Hi, I'm just getting started with C++ programming in Unreal Engine 4, and i'm having issues including TCircularBuffer in my source file.

I am currently using Unreal Engine 4.2 preview that i built from source on OSX 10.9.2 and XCode 5.1.1

In my file's Build.cs file i have

 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });  
 PrivateDependencyModuleNames.AddRange(new string[] { "Core" });

This is the header where i want to use it:

 #pragma once
 
 #include "Engine/CanvasRenderTarget2D.h"
 #include "Core.h"
 #include "MusicRenderTarget2D.generated.h"
 
 /**
  * 
  */
 UCLASS()
 class UMusicRenderTarget2D : public UCanvasRenderTarget2D
 {
     GENERATED_UCLASS_BODY()
     
     UPROPERTY()
     TCircularBuffer<uint32> *amplitudeBuffer;
     
     UPROPERTY()
     int32 currentBufferPos;
     
     UFUNCTION()
     virtual void PushAmplitude(uint32 amplitude);
     
 };
 

I keep getting Build Failed with the following error:

 /Users/freezx/Documents/Unreal Projects/BassDrop/Source/BassDrop/MusicRenderTarget2D.h(18) : Error: In MusicRenderTarget2D: Unrecognized type 'TCircularBuffer'



What could be wrong with the way i include the core classes? Thanks in advance.

Product Version: Not Selected
Tags:
more ▼

asked May 21 '14 at 11:11 PM in C++ Programming

avatar image

FREEZX
1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Looks like i solved my own problem. I removed the UPROPERTY before UCircularBuffer in my code and it worked! An explanation would be useful as for why this happens.

more ▼

answered May 21 '14 at 11:50 PM

avatar image

FREEZX
1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question