MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / SetPythonAttrInt

Method SetPythonAttrInt

Source/UnrealEnginePython/Public/PyCharacter.cpp:189–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void APyCharacter::SetPythonAttrInt(FString attr, int n)
190{
191
192
193 if (!py_character_instance)
194 return;
195
196 FScopePythonGIL gil;
197
198 if (PyObject_SetAttrString(py_character_instance, TCHAR_TO_UTF8(*attr), PyLong_FromLong(n)) < 0) {
199 UE_LOG(LogPython, Error, TEXT("Unable to set attribute %s"), *attr);
200 }
201}
202
203void APyCharacter::SetPythonAttrVector(FString attr, FVector vec)
204{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected