A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
GrippableDataTypes.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#include "CoreMinimal.h"
5#include "Engine/EngineTypes.h"
6#include "GrippableDataTypes.generated.h"
7
8// A version of the attachment structure that include welding data
9USTRUCT()
11{
12public:
13 GENERATED_BODY()
14
15 // Add in the is welded property
16 UPROPERTY()
17 bool bIsWelded;
18
19 bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
20 {
21 // Our additional weld bit is here
22 Ar.SerializeBits(&bIsWelded, 1);
23 Ar << AttachParent;
24 LocationOffset.NetSerialize(Ar, Map, bOutSuccess);
25 RelativeScale3D.NetSerialize(Ar, Map, bOutSuccess);
26 RotationOffset.SerializeCompressedShort(Ar);
27 Ar << AttachSocket;
28 Ar << AttachComponent;
29 return true;
30 }
31
33 {
34 bIsWelded = false;
35 }
36};
37
38template<>
39struct TStructOpsTypeTraits< FRepAttachmentWithWeld > : public TStructOpsTypeTraitsBase2<FRepAttachmentWithWeld>
40{
41 enum
42 {
43 WithNetSerializer = true//,
44 //WithNetSharedSerialization = true,
45 };
46};
bool NetSerialize(FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)