# Editor Scripting

**URL:** https://forums.unrealengine.com/c/development-discussion/pipeline-plugins/editor-scripting/45.md?page=65

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

**Page:** 66

---

## [Inventory Spawned Items Lifespan?](https://forums.unrealengine.com/t/inventory-spawned-items-lifespan/446031)

<div class="topic-metadata">

**Author:** [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Replies:** 3\
**Last updated:** [March 29, 2019, 3:47am UTC](https://forums.unrealengine.com/t/inventory-spawned-items-lifespan/446031 "2019-03-29T03:47:37Z")

</div>

I want to collect apples in my inventory. I spawn them in cartain places around the world and the player can pick them up. However, I am having trouble setting a lifespan for these objects inside the slot-based inventory…

---

## [Problems with Constructor of USturct](https://forums.unrealengine.com/t/problems-with-constructor-of-usturct/445613)

<div class="topic-metadata">

**Author:** [@MemmMem](https://forums.unrealengine.com/u/MemmMem)\
**Replies:** 2\
**Last updated:** [March 28, 2019, 7:51pm UTC](https://forums.unrealengine.com/t/problems-with-constructor-of-usturct/445613 "2019-03-28T19:51:56Z")

</div>

enter code hereI made a UStruct and it made some error, which tell me that ‘there’s no proper constructor.’ So I add another constructor empty in it. Then it works well, but I don know why this made problem and why this…

---

## [Create Level](https://forums.unrealengine.com/t/create-level/122180)

<div class="topic-metadata">

**Author:** [@aloivu](https://forums.unrealengine.com/u/aloivu)\
**Replies:** 11\
**Last updated:** [March 28, 2019, 6:04pm UTC](https://forums.unrealengine.com/t/create-level/122180 "2019-03-28T18:04:30Z")

</div>

How to create Level with Python Code? Thanks alot

---

## [How do I initialize and keep track of game states?](https://forums.unrealengine.com/t/how-do-i-initialize-and-keep-track-of-game-states/446035)

<div class="topic-metadata">

**Author:** [@MThaste](https://forums.unrealengine.com/u/MThaste)\
**Replies:** 3\
**Last updated:** [March 28, 2019, 12:57pm UTC](https://forums.unrealengine.com/t/how-do-i-initialize-and-keep-track-of-game-states/446035 "2019-03-28T12:57:39Z")

</div>

I’m doing a simple puzzle game (no multiplayer) and I’m trying to understand how to initialize the game itself. I read about gamemode&state but most of the people refer to it talking about multiplayer games, so I’m bit c…

---

## [reporting an unreal editor crash with this 1 line python code](https://forums.unrealengine.com/t/reporting-an-unreal-editor-crash-with-this-1-line-python-code/124078)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d021988d](https://forums.unrealengine.com/u/anonymous_user_d021988d)\
**Replies:** 1\
**Last updated:** [March 27, 2019, 5:15pm UTC](https://forums.unrealengine.com/t/reporting-an-unreal-editor-crash-with-this-1-line-python-code/124078 "2019-03-27T17:15:49Z")

</div>

CODE: unreal.FloatProperty() Version: 4.21.2-4753647+++UE4+Release-4.21 ERROR Message: Fatal error: \[\] \[Line: 2294\] Object FloatProperty None created in Package instead of Field 0x00007fff7d229149 KERNELBASE.dll!Unk…

---

## [Lighmap density numeric value](https://forums.unrealengine.com/t/lighmap-density-numeric-value/446071)

<div class="topic-metadata">

**Author:** [@ingleshveribet](https://forums.unrealengine.com/u/ingleshveribet)\
**Replies:** 0\
**Last updated:** [March 27, 2019, 5:27am UTC](https://forums.unrealengine.com/t/lighmap-density-numeric-value/446071 "2019-03-27T05:27:22Z")

</div>

Hi, i’m trying to play with Python scripting in ue, and what i want: I can see the Lightmap density by alt+0 view mode, but what engine value have all of this colors? e.g.: dark blue 0.1 green 0.5 red 1 or somethig like…

---

## [CurveVector: Setting the UProperty FloatCurves\[3\]](https://forums.unrealengine.com/t/curvevector-setting-the-uproperty-floatcurves-3/124061)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d021988d](https://forums.unrealengine.com/u/anonymous_user_d021988d)\
**Replies:** 0\
**Last updated:** [March 26, 2019, 7:50pm UTC](https://forums.unrealengine.com/t/curvevector-setting-the-uproperty-floatcurves-3/124061 "2019-03-26T19:50:31Z")

</div>

in Python, i wish to create a CurveVector object and specify the 3 FloatCurves for the x,y and z. can u advice how to do that.

---

## [What's the relation between UModelComponent and ABrush?](https://forums.unrealengine.com/t/whats-the-relation-between-umodelcomponent-and-abrush/444044)

<div class="topic-metadata">

**Author:** [@Two-faced](https://forums.unrealengine.com/u/Two-faced)\
**Replies:** 1\
**Last updated:** [March 26, 2019, 7:39pm UTC](https://forums.unrealengine.com/t/whats-the-relation-between-umodelcomponent-and-abrush/444044 "2019-03-26T19:39:50Z")

</div>

In other words, how do I get reference to Brush having it’s UModelComponent reference from HitResult?

---

## [How do I expose a USTRUCT by reference/pointer?](https://forums.unrealengine.com/t/how-do-i-expose-a-ustruct-by-reference-pointer/309079)

<div class="topic-metadata">

**Author:** [@Backov](https://forums.unrealengine.com/u/Backov)\
**Replies:** 17\
**Last updated:** [March 26, 2019, 5:07pm UTC](https://forums.unrealengine.com/t/how-do-i-expose-a-ustruct-by-reference-pointer/309079 "2019-03-26T17:07:52Z")

</div>

I have an object that’s a proxy for an IDetailsView. It’s a proxy because it needs to combine two objects from different modules, and let the user edit their properties. Fine. In trying to make the structure less grody,…

---

## [Item combine](https://forums.unrealengine.com/t/item-combine/426499)

<div class="topic-metadata">

**Author:** [@Pekka](https://forums.unrealengine.com/u/Pekka)\
**Replies:** 3\
**Last updated:** [March 26, 2019, 12:12am UTC](https://forums.unrealengine.com/t/item-combine/426499 "2019-03-26T00:12:14Z")

</div>

Hi, Im trying to create a simple way to combine two items in inventory, click item which opens sub menu where you click use with and then you can click another item and it brings and out come like for an example you cli…

---

## [UE 4.22 python Crash](https://forums.unrealengine.com/t/ue-4-22-python-crash/445951)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_dd112784](https://forums.unrealengine.com/u/anonymous_user_dd112784)\
**Replies:** 0\
**Last updated:** [March 25, 2019, 3:10pm UTC](https://forums.unrealengine.com/t/ue-4-22-python-crash/445951 "2019-03-25T15:10:07Z")

</div>

Why does thess python lines crash? 1- Obj = unreal.SequenceRecorderSettings() LogPython: Error: AttributeError: ‘module’ object has no attribute ‘SequenceRecorderSettings’ 2- Obj2 = unreal.AudioRecordingMode LogPyt…

---

## [How can I use an item according to ID number? (inventory)](https://forums.unrealengine.com/t/how-can-i-use-an-item-according-to-id-number-inventory/445897)

<div class="topic-metadata">

**Author:** [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Replies:** 0\
**Last updated:** [March 24, 2019, 4:27pm UTC](https://forums.unrealengine.com/t/how-can-i-use-an-item-according-to-id-number-inventory/445897 "2019-03-24T16:27:54Z")

</div>

I have an inventory, a slot widget and an item in the inventory that I want to it to interact with another actor (a box) standing in my level when I press the mouse on the item’s slot. It all works up to this point, but…

---

## [how to change material's options with python or EditorUtilityBlueprint?](https://forums.unrealengine.com/t/how-to-change-materials-options-with-python-or-editorutilityblueprint/220065)

<div class="topic-metadata">

**Author:** [@assassinzxw](https://forums.unrealengine.com/u/assassinzxw)\
**Replies:** 0\
**Last updated:** [March 22, 2019, 10:06am UTC](https://forums.unrealengine.com/t/how-to-change-materials-options-with-python-or-editorutilityblueprint/220065 "2019-03-22T10:06:00Z")

</div>

is it possible to use EditorUtilityBlueprint to change material’s options?

---

## [TArray of Structs, populating via GetAllRows (UDataTable)](https://forums.unrealengine.com/t/tarray-of-structs-populating-via-getallrows-udatatable/428841)

<div class="topic-metadata">

**Author:** [@fallingbrickwork](https://forums.unrealengine.com/u/fallingbrickwork)\
**Replies:** 2\
**Last updated:** [March 21, 2019, 1:41pm UTC](https://forums.unrealengine.com/t/tarray-of-structs-populating-via-getallrows-udatatable/428841 "2019-03-21T13:41:03Z")

</div>

Hi all, Simple C++ Q for you… I’m defining a TArray of UStructs in my header file like this: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Data") TArray\<FStarMapDataLookupTable\> OutAllRows; // TArray to hold …

---

## [Datasmith Reimport using Python](https://forums.unrealengine.com/t/datasmith-reimport-using-python/123767)

<div class="topic-metadata">

**Author:** [@brianegreen](https://forums.unrealengine.com/u/brianegreen)\
**Replies:** 1\
**Last updated:** [March 19, 2019, 10:10pm UTC](https://forums.unrealengine.com/t/datasmith-reimport-using-python/123767 "2019-03-19T22:10:18Z")

</div>

Hi, I am hoping to re-import my datasmith files in my pipeline process. Unfortunately I have not been able to find any examples re-importing datasmith files. I see there is a DatasmithImportOptions class (which include…

---

## [Blueprint actor doesn't update ingame](https://forums.unrealengine.com/t/blueprint-actor-doesnt-update-ingame/445503)

<div class="topic-metadata">

**Author:** [@mandrille](https://forums.unrealengine.com/u/mandrille)\
**Replies:** 7\
**Last updated:** [March 18, 2019, 4:05pm UTC](https://forums.unrealengine.com/t/blueprint-actor-doesnt-update-ingame/445503 "2019-03-18T16:05:18Z")

</div>

I made a floor blueprint that has Num X tiles variable on it. I can edit this in editor just fine, now in the level blueprint I’m trying to call a random variable into that Num X and it works fine, I can see the number c…

---

## [SyntaxError:NavSysPathsUpdate.py, line 184](https://forums.unrealengine.com/t/syntaxerror-navsyspathsupdate-py-line-184/445505)

<div class="topic-metadata">

**Author:** [@K.Dorogan](https://forums.unrealengine.com/u/K.Dorogan)\
**Replies:** 0\
**Last updated:** [March 18, 2019, 1:13pm UTC](https://forums.unrealengine.com/t/syntaxerror-navsyspathsupdate-py-line-184/445505 "2019-03-18T13:13:46Z")

</div>

Hi, I try to execute the NavSysPathsUpdate.py on my Ue4.21 but I have a SynstaxError on line 184 : def find\_changes(full\_file\_path): changes = \[\] file = open(full\_file\_path, 'r', encoding='utf-8') …

---

## [Why won't my save file work the way I want it to?](https://forums.unrealengine.com/t/why-wont-my-save-file-work-the-way-i-want-it-to/444004)

<div class="topic-metadata">

**Author:** [@SamuelDancing](https://forums.unrealengine.com/u/SamuelDancing)\
**Replies:** 6\
**Last updated:** [March 17, 2019, 7:26pm UTC](https://forums.unrealengine.com/t/why-wont-my-save-file-work-the-way-i-want-it-to/444004 "2019-03-17T19:26:54Z")

</div>

I have tried many things and I’m not having any luck trying to get this thing to work the way I want it to. What I want to happen is when I quicksave and exit, I want to save some stats on the current player, and the pl…

---

## [Editor scripting](https://forums.unrealengine.com/t/editor-scripting/123616)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_08ddb7601](https://forums.unrealengine.com/u/anonymous_user_08ddb7601)\
**Replies:** 0\
**Last updated:** [March 16, 2019, 8:47am UTC](https://forums.unrealengine.com/t/editor-scripting/123616 "2019-03-16T08:47:23Z")

</div>

Hi all I’m trying to find a way to batch process meshes and editing the mesh build settings. ​​​These don’t seem to be exposed to the set\_editor\_property(). Is there any way of accessing them? The one I’m looking for id…

---

## [Can't save arrays to save game](https://forums.unrealengine.com/t/cant-save-arrays-to-save-game/445313)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_538bcfb0](https://forums.unrealengine.com/u/anonymous_user_538bcfb0)\
**Replies:** 2\
**Last updated:** [March 14, 2019, 5:13pm UTC](https://forums.unrealengine.com/t/cant-save-arrays-to-save-game/445313 "2019-03-14T17:13:17Z")

</div>

Hi, I can save any other data to my save game file, but my arrays will not save. When I close the game and restart my arrays will be empty, while all other data has save properly using the same blueprint method. I can…

---

## [Using Python to create Destructible Meshes in a batch?](https://forums.unrealengine.com/t/using-python-to-create-destructible-meshes-in-a-batch/123526)

<div class="topic-metadata">

**Author:** [@DarkS474](https://forums.unrealengine.com/u/DarkS474)\
**Replies:** 0\
**Last updated:** [March 13, 2019, 4:36pm UTC](https://forums.unrealengine.com/t/using-python-to-create-destructible-meshes-in-a-batch/123526 "2019-03-13T16:36:49Z")

</div>

Is it possible to achieve the same as the command line Nvidia APEX SDK FractureTool.exe batch fracturing/destructible meshes creation by using a Python script that would fracture each static mesh with a set of parameters…

---

## [How to give object to a npc from my inventory?](https://forums.unrealengine.com/t/how-to-give-object-to-a-npc-from-my-inventory/444972)

<div class="topic-metadata">

**Author:** [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Replies:** 0\
**Last updated:** [March 9, 2019, 11:42pm UTC](https://forums.unrealengine.com/t/how-to-give-object-to-a-npc-from-my-inventory/444972 "2019-03-09T23:42:05Z")

</div>

Pretty self explanatory. I have a drag n drop inventory and I want to be able to give other npc’s objects. The idea is to also use this mechanic with objects too so combining an object from inventory with a npc or object…

---

## [how to struct on c++](https://forums.unrealengine.com/t/how-to-struct-on-c/319636)

<div class="topic-metadata">

**Author:** [@Iatsu](https://forums.unrealengine.com/u/Iatsu)\
**Replies:** 30\
**Last updated:** [March 8, 2019, 3:49pm UTC](https://forums.unrealengine.com/t/how-to-struct-on-c/319636 "2019-03-08T15:49:12Z")

</div>

I honestly don’t understand why there’s almost no proper explanation about this, I am new to coding on the engine. So far I got that structs help me organize custom variable data and that it basically looks like this: U…

---

## [Import dialog](https://forums.unrealengine.com/t/import-dialog/123246)

<div class="topic-metadata">

**Author:** [@Code\_Goblin](https://forums.unrealengine.com/u/Code_Goblin)\
**Replies:** 2\
**Last updated:** [March 8, 2019, 10:47am UTC](https://forums.unrealengine.com/t/import-dialog/123246 "2019-03-08T10:47:11Z")

</div>

I’m trying to figure out if there’s a way to summon a file browser type dialog that I can use to import assets with custom import options. I’ve tried: unreal.AssetTools.import\_assets\_with\_dialog('/Game/tmp') …but I g…

---

## [Inventory Item Stacking](https://forums.unrealengine.com/t/inventory-item-stacking/444810)

<div class="topic-metadata">

**Author:** [@THT\_Nick](https://forums.unrealengine.com/u/THT_Nick)\
**Replies:** 4\
**Last updated:** [March 7, 2019, 5:05pm UTC](https://forums.unrealengine.com/t/inventory-item-stacking/444810 "2019-03-07T17:05:47Z")

</div>

Hello guys I have an inventory system with Add Item if there is no in the Inventory(Array) and if exists change the values of this item. The only problem i have is that when the Item Exists I can’t find the item in the …

---

## [How to get enemy variable for animation blueprint](https://forums.unrealengine.com/t/how-to-get-enemy-variable-for-animation-blueprint/444698)

<div class="topic-metadata">

**Author:** [@Ugway007](https://forums.unrealengine.com/u/Ugway007)\
**Replies:** 1\
**Last updated:** [March 6, 2019, 3:33pm UTC](https://forums.unrealengine.com/t/how-to-get-enemy-variable-for-animation-blueprint/444698 "2019-03-06T15:33:13Z")

</div>

I want that a character on scene (enemy) set variable and than its animation blueprint get this property for performing the transition rules. How can I make it. I tried to cast to the character blueprint and its aicontr…

---

## [How to get slot name?](https://forums.unrealengine.com/t/how-to-get-slot-name/121654)

<div class="topic-metadata">

**Author:** [@flatKAT](https://forums.unrealengine.com/u/flatKAT)\
**Replies:** 5\
**Last updated:** [March 5, 2019, 6:04pm UTC](https://forums.unrealengine.com/t/how-to-get-slot-name/121654 "2019-03-05T18:04:11Z")

</div>

Hi, I am currently importing fbx assets without the materials. Using : unreal.StaticMaterial — Unreal Python 5.1 (Experimental) documentation as a reference, I would like to be able to get: imported\_material\_slot\_name …

---

## [Some setup questions (Visual Studio Code)](https://forums.unrealengine.com/t/some-setup-questions-visual-studio-code/119638)

<div class="topic-metadata">

**Author:** [@duke22](https://forums.unrealengine.com/u/duke22)\
**Replies:** 1\
**Last updated:** [March 4, 2019, 7:46pm UTC](https://forums.unrealengine.com/t/some-setup-questions-visual-studio-code/119638 "2019-03-04T19:46:12Z")

</div>

I’m loving python so far, however what would make it infinitely more useful is the following: What do I reference to get autocompletion for the unreal.\* module? Can I use the messaging system or something to execute py…

---

## [Issues With Setting-Up UInterpToMovementComponent](https://forums.unrealengine.com/t/issues-with-setting-up-uinterptomovementcomponent/403274)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_888b9c60](https://forums.unrealengine.com/u/anonymous_user_888b9c60)\
**Replies:** 2\
**Last updated:** [March 4, 2019, 2:07pm UTC](https://forums.unrealengine.com/t/issues-with-setting-up-uinterptomovementcomponent/403274 "2019-03-04T14:07:49Z")

</div>

So in my project (known as Quest: To Be Defined), I set-up a class in C++, for which there is then a Blueprint Class that inherits from this native class (allowing one to choose certain components of this entity). This …

---

## [How to run python with UE4Editor-Cmd.exe in unreal engine 4.19](https://forums.unrealengine.com/t/how-to-run-python-with-ue4editor-cmd-exe-in-unreal-engine-4-19/123032)

<div class="topic-metadata">

**Author:** [@DengTaLiangLe](https://forums.unrealengine.com/u/DengTaLiangLe)\
**Replies:** 3\
**Last updated:** [March 3, 2019, 10:02am UTC](https://forums.unrealengine.com/t/how-to-run-python-with-ue4editor-cmd-exe-in-unreal-engine-4-19/123032 "2019-03-03T10:02:04Z")

</div>

How to run python with UE4Editor-Cmd.exe in unreal engine 4.19 i use this method ,but get the error : UE4Editor-Cmd.exe -run=pythonscript -script=“c:\\my\_script.py” \[2019.03.02-01.35.02:874\] 0\]LogInit: Error: pythonsc…

[Previous page](https://forums.unrealengine.com/c/development-discussion/pipeline-plugins/editor-scripting/45.md?page=64)

[Next page](https://forums.unrealengine.com/c/development-discussion/pipeline-plugins/editor-scripting/45.md?page=66)
