Download

Is there any way to set "sensetivaty" for replication on TArrays?

Hey just wondering if it is possible to set the sensetivety in witch a array replicates?

I noticed that if i add or remove i element to a TArray it gets replicated.
But if a member in the element structure is changed it will not replicate.

So for now i made this structure to make sure its always replicated when changed.



/**
 * Contains inventory array and integer "condition".
 */
USTRUCT(Blueprintable)
struct FInventoryContainerStruct
{
	GENERATED_USTRUCT_BODY()

public:

	// Array of items in the inventory container.
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "FInventoryContainerStruct")
		TArray<FItemInventoryStruct> InventoryArray;

	// Changed everytime array is edited, to make sure array get replicated to client.
	UPROPERTY()
		int32 Condition;

	/**
	 * Update the Inventory Container to guarantee replication to owner. 
	 * @param: Pass in a posetive or negative integer. */
	void UpdateArrayCondition(int32 ToAdd)
	{
		Condition += ToAdd;
	}

};


Now this is not a huge issue and preferly i don`t replicate alot of arrays.
But when you do, how do you prefer to do that?
This is only relevant when its a Array of structures of course but stile, love to hear your input on this.

WCode.

Hi, im having the same issue in blueprint. My array of struct isn’t replicated when i change a variable inside my struct. Is this a bug or it is not supported?
I could use some help on this. Thx