# Editor Scripting

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

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

**Page:** 68

---

## [Variable in GameState only being modified on Client side](https://forums.unrealengine.com/t/variable-in-gamestate-only-being-modified-on-client-side/422165)

<div class="topic-metadata">

**Author:** [@cnClockwork](https://forums.unrealengine.com/u/cnClockwork)\
**Replies:** 4\
**Last updated:** [January 28, 2019, 9:10am UTC](https://forums.unrealengine.com/t/variable-in-gamestate-only-being-modified-on-client-side/422165 "2019-01-28T09:10:08Z")

</div>

Hi all, I am trying to modify an array variable located in my custom GameState, WITHIN my custom GS blueprint, and only the client recognizes the change, not the server. I know this because I have the length of the arra…

---

## [Finding Reference for Casting](https://forums.unrealengine.com/t/finding-reference-for-casting/442146)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_6325c20c](https://forums.unrealengine.com/u/anonymous_user_6325c20c)\
**Replies:** 7\
**Last updated:** [January 27, 2019, 4:03pm UTC](https://forums.unrealengine.com/t/finding-reference-for-casting/442146 "2019-01-27T16:03:08Z")

</div>

Hi! So I can’t find a reference for my cast, so that it works, I don’t have an event, I don’t have a trace, I don’t know which array my object is, and none of the “get” references work. Do you have any tips on how to f…

---

## [How do you add a section to a MovieSceneAudioTrack in python without crashing the editor?](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019)

<div class="topic-metadata">

**Author:** [@The\_Choop](https://forums.unrealengine.com/u/The_Choop)\
**Replies:** 2\
**Last updated:** [January 25, 2019, 7:48pm UTC](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019 "2019-01-25T19:48:39Z")

</div>

Hello, executing the audioTrack.add\_section() in the below causes the editor to crash. I can add sections to other types of tracks but the unreal.MovieSceneAudioTrack specifically seems to have this issue. Does anyone kn…

---

## [Import Asset command line - UE4Editor-Cmd.exe](https://forums.unrealengine.com/t/import-asset-command-line-ue4editor-cmd-exe/121195)

<div class="topic-metadata">

**Author:** [@magnus.larsson](https://forums.unrealengine.com/u/magnus.larsson)\
**Replies:** 4\
**Last updated:** [January 24, 2019, 1:31pm UTC](https://forums.unrealengine.com/t/import-asset-command-line-ue4editor-cmd-exe/121195 "2019-01-24T13:31:29Z")

</div>

Hello. I have a script where I can import a defined FBX by running the python script inside unreal in the “output log” tab. It works fine and creates the assets etc. Now I want to do the same thing but from a command l…

---

## [Where to keep players data in multiplayer game ?](https://forums.unrealengine.com/t/where-to-keep-players-data-in-multiplayer-game/441921)

<div class="topic-metadata">

**Author:** [@EZEL3050](https://forums.unrealengine.com/u/EZEL3050)\
**Replies:** 2\
**Last updated:** [January 24, 2019, 5:17am UTC](https://forums.unrealengine.com/t/where-to-keep-players-data-in-multiplayer-game/441921 "2019-01-24T05:17:38Z")

</div>

Hi i’m making a massive multiplayer open world game and i just want to know is it really dangerous to put players “Money” , “XP” in players savegame ? does it make the players easy to cheat ? or should i have services l…

---

## [Predefine array of struct with actor members](https://forums.unrealengine.com/t/predefine-array-of-struct-with-actor-members/441938)

<div class="topic-metadata">

**Author:** [@rebusb](https://forums.unrealengine.com/u/rebusb)\
**Replies:** 10\
**Last updated:** [January 24, 2019, 12:14am UTC](https://forums.unrealengine.com/t/predefine-array-of-struct-with-actor-members/441938 "2019-01-24T00:14:31Z")

</div>

This is for game logic. I have a number Switch Actors instanced in my level. Each switch can be off or on. I am trying to create an array of the switch instances with the correct state that solves the puzzle. Made a blue…

---

## [How to auto generate landscape proxy with python?](https://forums.unrealengine.com/t/how-to-auto-generate-landscape-proxy-with-python/119080)

<div class="topic-metadata">

**Author:** [@YakSue](https://forums.unrealengine.com/u/YakSue)\
**Replies:** 1\
**Last updated:** [January 23, 2019, 12:04am UTC](https://forums.unrealengine.com/t/how-to-auto-generate-landscape-proxy-with-python/119080 "2019-01-23T00:04:23Z")

</div>

Hi friends, I have some large landscape data. I need a script to auto load these large landscape then cut them into pieces and throw them to streaming levels. I know how to do it manully, that’s to load the landscape a…

---

## [How to spawn an Actor in a SPECIFIC location?](https://forums.unrealengine.com/t/how-to-spawn-an-actor-in-a-specific-location/441737)

<div class="topic-metadata">

**Author:** [@Binapple](https://forums.unrealengine.com/u/Binapple)\
**Replies:** 6\
**Last updated:** [January 21, 2019, 1:00pm UTC](https://forums.unrealengine.com/t/how-to-spawn-an-actor-in-a-specific-location/441737 "2019-01-21T13:00:27Z")

</div>

I have 3 blueprint classes. The first one is the Third Person Character blueprint I got from the engine. The second is BP\_Cube created from the cube static mesh. The third is BP\_Shpere created from the sphere static m…

---

## [save/load multiple checkbox state](https://forums.unrealengine.com/t/save-load-multiple-checkbox-state/441744)

<div class="topic-metadata">

**Author:** [@nitron64](https://forums.unrealengine.com/u/nitron64)\
**Replies:** 2\
**Last updated:** [January 21, 2019, 10:49am UTC](https://forums.unrealengine.com/t/save-load-multiple-checkbox-state/441744 "2019-01-21T10:49:00Z")

</div>

The checkbox enables/disables buttons. There are over 100 checkbox in game which do the same thing for there individual linked buttons. \] Creating variables for each checkbox will be time consuming and inefficient. I…

---

## [How to remove item from inventory when used?](https://forums.unrealengine.com/t/how-to-remove-item-from-inventory-when-used/441609)

<div class="topic-metadata">

**Author:** [@emotivarts](https://forums.unrealengine.com/u/emotivarts)\
**Replies:** 5\
**Last updated:** [January 19, 2019, 9:46am UTC](https://forums.unrealengine.com/t/how-to-remove-item-from-inventory-when-used/441609 "2019-01-19T09:46:42Z")

</div>

Hi there! Can’t figure out how to remove item from inventory based on item IDs when pressing key. When 0 is pressed, its getting away ID1, but when I press 1, just my ID2 is turning to ID1. Hope someone can help me out… …

---

## [How to remove item from inventory when use by pressing key?](https://forums.unrealengine.com/t/how-to-remove-item-from-inventory-when-use-by-pressing-key/441610)

<div class="topic-metadata">

**Author:** [@emotivarts](https://forums.unrealengine.com/u/emotivarts)\
**Replies:** 0\
**Last updated:** [January 19, 2019, 4:36am UTC](https://forums.unrealengine.com/t/how-to-remove-item-from-inventory-when-use-by-pressing-key/441610 "2019-01-19T04:36:30Z")

</div>

Hi there! Can’t figure out how to remove item from inventory based on item IDs. When 0 is pressed, its getting away ID1, but when I press 1, just my ID2 is turning to ID1. Hope someone can help me out… Thanks a lot! \[VI…

---

## [Raycasting a ray in unreal editor using Python. Is it possible?](https://forums.unrealengine.com/t/raycasting-a-ray-in-unreal-editor-using-python-is-it-possible/441534)

<div class="topic-metadata">

**Author:** [@J\_C\_1](https://forums.unrealengine.com/u/J_C_1)\
**Replies:** 0\
**Last updated:** [January 18, 2019, 12:21am UTC](https://forums.unrealengine.com/t/raycasting-a-ray-in-unreal-editor-using-python-is-it-possible/441534 "2019-01-18T00:21:05Z")

</div>

Hi, can someone explain to me how to use RaycastComponent in Python scirpt(\[link text\]\[1\]). I would like to project a ray from an actor and read the hit result. \[1\]: unreal.RaycastComponent — Unreal Python 4.27 (Experim…

---

## [如何通过python给材质球创建图像节点，并连接  How to create image nodes for material balls through Python and connect them](https://forums.unrealengine.com/t/python-how-to-create-image-nodes-for-material-balls-through-python-and-connect-them/441507)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_03279145](https://forums.unrealengine.com/u/anonymous_user_03279145)\
**Replies:** 0\
**Last updated:** [January 17, 2019, 10:53pm UTC](https://forums.unrealengine.com/t/python-how-to-create-image-nodes-for-material-balls-through-python-and-connect-them/441507 "2019-01-17T22:53:23Z")

</div>

我把从max导出的fbx导入到ue4中，材质都不正确了，我想用python脚本修复他，但是不知具体该如何去做，请求帮助 I imported FBX from Max into ue4. The material is incorrect. I want to fix it with Python script, but I don’t know how to do it. Ask for help.

---

## [Soft and hard reference differences in BP](https://forums.unrealengine.com/t/soft-and-hard-reference-differences-in-bp/439110)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_3af026a2](https://forums.unrealengine.com/u/anonymous_user_3af026a2)\
**Replies:** 7\
**Last updated:** [January 17, 2019, 12:27am UTC](https://forums.unrealengine.com/t/soft-and-hard-reference-differences-in-bp/439110 "2019-01-17T00:27:11Z")

</div>

What a key difference between soft and hard references? Is there a perfomance difference if i am would parse array of soft and hard references?

---

## [Replacing materials imported from Revit or SketchUp](https://forums.unrealengine.com/t/replacing-materials-imported-from-revit-or-sketchup/121212)

<div class="topic-metadata">

**Author:** [@shahbaar](https://forums.unrealengine.com/u/shahbaar)\
**Replies:** 0\
**Last updated:** [January 16, 2019, 7:08pm UTC](https://forums.unrealengine.com/t/replacing-materials-imported-from-revit-or-sketchup/121212 "2019-01-16T19:08:03Z")

</div>

Hi all, I am trying to replace the material of StaticMeshActors imported from SketchUp or Revit through datasmith based on the example here: https://epicgames.app.box.com/v/Pyth…e/279078836873 or the code at 0:57 here…

---

## [Error Message, Invalid Type Array of Structures](https://forums.unrealengine.com/t/error-message-invalid-type-array-of-structures/441299)

<div class="topic-metadata">

**Author:** [@RedZang](https://forums.unrealengine.com/u/RedZang)\
**Replies:** 1\
**Last updated:** [January 14, 2019, 9:00pm UTC](https://forums.unrealengine.com/t/error-message-invalid-type-array-of-structures/441299 "2019-01-14T21:00:35Z")

</div>

Hi! I’m still new to UE4 and even newer to the Blueprints part of it. I’m currently following a tutorial on how to make a pinball game and I’m currently putting together a ‘Determine Highest Score Value’ portion. After l…

---

## [\[Timeline\] Change a float 0 to 1 over X seconds](https://forums.unrealengine.com/t/timeline-change-a-float-0-to-1-over-x-seconds/441281)

<div class="topic-metadata">

**Author:** [@Beerbill](https://forums.unrealengine.com/u/Beerbill)\
**Replies:** 5\
**Last updated:** [January 14, 2019, 8:54pm UTC](https://forums.unrealengine.com/t/timeline-change-a-float-0-to-1-over-x-seconds/441281 "2019-01-14T20:54:28Z")

</div>

Hello Community, I have been struggling with a problem and hopefully you will ba able to give me some insight. I want to change a value from 0 to 1 over X seconds, I was able to do that using a Timeline but the amount …

---

## [Creating Dynamic Expanding Widget](https://forums.unrealengine.com/t/creating-dynamic-expanding-widget/440993)

<div class="topic-metadata">

**Author:** [@xRoci](https://forums.unrealengine.com/u/xRoci)\
**Replies:** 3\
**Last updated:** [January 11, 2019, 11:18am UTC](https://forums.unrealengine.com/t/creating-dynamic-expanding-widget/440993 "2019-01-11T11:18:04Z")

</div>

Hello, I am making a text based inventory system instead of the typical slot based. I’ve run into an issue where I’m trying to make the item name on clicked expand to reveal Item information. Now, I’ve got the Item butt…

---

## [PythonでLevelSequenceのStart、Endを設定したい。](https://forums.unrealengine.com/t/python-levelsequence-start-end/440866)

<div class="topic-metadata">

**Author:** [@cinnamon0522](https://forums.unrealengine.com/u/cinnamon0522)\
**Replies:** 2\
**Last updated:** [January 10, 2019, 3:14am UTC](https://forums.unrealengine.com/t/python-levelsequence-start-end/440866 "2019-01-10T03:14:28Z")

</div>

Pythonを使用して、LevelSequenceのStartとEndを設定したいのですが、やり方が分かりません。 取得は出来るのですが･･･。コンテンツブラウザで、LevelSequenceを選択して実行しています。 import unreal @unreal.uclass() class MyEditorUtility(unreal.GlobalEditorUtilityBase): pass editor\_util…

---

## [Reading material from PyActor](https://forums.unrealengine.com/t/reading-material-from-pyactor/120529)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_ab61fbb4](https://forums.unrealengine.com/u/anonymous_user_ab61fbb4)\
**Replies:** 4\
**Last updated:** [January 8, 2019, 6:15pm UTC](https://forums.unrealengine.com/t/reading-material-from-pyactor/120529 "2019-01-08T18:15:56Z")

</div>

Hello alltogether, so, I want to get a PyActors Material, but don’t know how to do it. I’m an absolute beginner and need to get familiar with the Unreal API. Here’s my little python script: import unreal\_engine as ue…

---

## [Finding texture2d from a fstring at runtime](https://forums.unrealengine.com/t/finding-texture2d-from-a-fstring-at-runtime/439908)

<div class="topic-metadata">

**Author:** [@Redsett](https://forums.unrealengine.com/u/Redsett)\
**Replies:** 3\
**Last updated:** [January 8, 2019, 1:33pm UTC](https://forums.unrealengine.com/t/finding-texture2d-from-a-fstring-at-runtime/439908 "2019-01-08T13:33:29Z")

</div>

Hello, I have a FString variable that has my relative path to the uasset texture. How do I use the variable in getting the utexture2d object? static ConstructorHelpers::FObjectFinder CrosshairTexObj(TEXT(“Texture2D’%s’”…

---

## [How to permanently save a variable on dedicated server.](https://forums.unrealengine.com/t/how-to-permanently-save-a-variable-on-dedicated-server/440827)

<div class="topic-metadata">

**Author:** [@OG\_FATFACE\_420](https://forums.unrealengine.com/u/OG_FATFACE_420)\
**Replies:** 0\
**Last updated:** [January 8, 2019, 12:22am UTC](https://forums.unrealengine.com/t/how-to-permanently-save-a-variable-on-dedicated-server/440827 "2019-01-08T00:22:12Z")

</div>

How do I permanently save something. I am running on a dedicated server and just wondering how to save a variable permanently, across a dedicated server. Thanks!

---

## [Interp not working?](https://forums.unrealengine.com/t/interp-not-working/297763)

<div class="topic-metadata">

**Author:** [@JakeOfSpades\_1](https://forums.unrealengine.com/u/JakeOfSpades_1)\
**Replies:** 1\
**Last updated:** [January 7, 2019, 11:08pm UTC](https://forums.unrealengine.com/t/interp-not-working/297763 "2019-01-07T23:08:12Z")

</div>

I am trying to use VInterp to smoothly set the world location of my cable component. If the player misses a hookshot, I want it to smoothly interpolate from the players position to a distance far from the player. However…

---

## [TMap with TWeakObjectPtr crashes upon engine restart](https://forums.unrealengine.com/t/tmap-with-tweakobjectptr-crashes-upon-engine-restart/440797)

<div class="topic-metadata">

**Author:** [@Herr\_Edgy](https://forums.unrealengine.com/u/Herr_Edgy)\
**Replies:** 0\
**Last updated:** [January 7, 2019, 5:16pm UTC](https://forums.unrealengine.com/t/tmap-with-tweakobjectptr-crashes-upon-engine-restart/440797 "2019-01-07T17:16:33Z")

</div>

I’m currently doing a sort of “Database” UDataAsset that gets created in code. In it, there is a TMap with DataAsset A as keys, which are mapped to other DataAsset B as values. For various reasons, I have to do it this …

---

## [Set Array Elem sets all other indexes to 0](https://forums.unrealengine.com/t/set-array-elem-sets-all-other-indexes-to-0/440694)

<div class="topic-metadata">

**Author:** [@GameSoldier](https://forums.unrealengine.com/u/GameSoldier)\
**Replies:** 6\
**Last updated:** [January 6, 2019, 6:07pm UTC](https://forums.unrealengine.com/t/set-array-elem-sets-all-other-indexes-to-0/440694 "2019-01-06T18:07:10Z")

</div>

I have a Problem with this funktion. With this funktion i want to increase and decrease an Int Value of an Array for an Index given as Input. for that i first load my savegame to get acces to my Int Array. Then is take …

---

## [C++ USTRUCT build problems](https://forums.unrealengine.com/t/c-ustruct-build-problems/440668)

<div class="topic-metadata">

**Author:** [@mistercokes](https://forums.unrealengine.com/u/mistercokes)\
**Replies:** 3\
**Last updated:** [January 5, 2019, 4:58pm UTC](https://forums.unrealengine.com/t/c-ustruct-build-problems/440668 "2019-01-05T16:58:06Z")

</div>

I am trying to create a simple USTRUCT that includes multiple property values. For testing, I created a dummy struct looking like this: USTRUCT() struct FSomeInformationStruct { GENERATED\_BODY() UPROPERTY() int32 so…

---

## [Python Editor Scripting: Set viewport orientation?](https://forums.unrealengine.com/t/python-editor-scripting-set-viewport-orientation/120437)

<div class="topic-metadata">

**Author:** [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Replies:** 4\
**Last updated:** [January 5, 2019, 4:33pm UTC](https://forums.unrealengine.com/t/python-editor-scripting-set-viewport-orientation/120437 "2019-01-05T16:33:09Z")

</div>

Hey, I hope to find a solution for the issue with viewport reset: https://answers.unrealengine.com/questions/858079/viewport-reset-after-map-load-how-to-avoid-this.html … So I thought that maybe there is some way to con…

---

## [How to get reference of created instance in blueprint](https://forums.unrealengine.com/t/how-to-get-reference-of-created-instance-in-blueprint/440420)

<div class="topic-metadata">

**Author:** [@L11777](https://forums.unrealengine.com/u/L11777)\
**Replies:** 1\
**Last updated:** [January 2, 2019, 1:18am UTC](https://forums.unrealengine.com/t/how-to-get-reference-of-created-instance-in-blueprint/440420 "2019-01-02T01:18:47Z")

</div>

I’m trying to have a blueprint execute a function that the other blueprint can register. But the other blueprint actor is also being created by the first blueprint. How can I have the first blueprint get reference to the…

---

## [python to exe](https://forums.unrealengine.com/t/python-to-exe/120141)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_11de84fe1](https://forums.unrealengine.com/u/anonymous_user_11de84fe1)\
**Replies:** 1\
**Last updated:** [December 29, 2018, 6:13pm UTC](https://forums.unrealengine.com/t/python-to-exe/120141 "2018-12-29T18:13:01Z")

</div>

What is the best way to make an executable file from a python script?

---

## [Handling set and then use variables?](https://forums.unrealengine.com/t/handling-set-and-then-use-variables/440239)

<div class="topic-metadata">

**Author:** [@L11777](https://forums.unrealengine.com/u/L11777)\
**Replies:** 7\
**Last updated:** [December 29, 2018, 2:49pm UTC](https://forums.unrealengine.com/t/handling-set-and-then-use-variables/440239 "2018-12-29T14:49:59Z")

</div>

I’m setting a variable on initiation (based on a switch case), but for some reason that doesn’t seem to be registered first, and looks like when something doesn’t go right, the instance either spawns at 0,0,0 position an…

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

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