# Editor Scripting

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

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

**Page:** 28

---

## [Get headless screenshot](https://forums.unrealengine.com/t/get-headless-screenshot/269232)

<div class="topic-metadata">

**Author:** [@jobim](https://forums.unrealengine.com/u/jobim)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 2:02pm UTC](https://forums.unrealengine.com/t/get-headless-screenshot/269232 "2021-12-30T14:02:55Z")

</div>

Hi, I want to take a screenshot of the viewport only by running a python script from the command line. I wrote this: import unreal actor\_class = unreal.CameraActor actor\_location = unreal.Vector(-250,0.0,150.0) actor…

---

## [Pedometer/Accelerator API](https://forums.unrealengine.com/t/pedometer-accelerator-api/269164)

<div class="topic-metadata">

**Author:** [@ForeverAutumn](https://forums.unrealengine.com/u/ForeverAutumn)\
**Replies:** 0\
**Last updated:** [December 30, 2021, 7:29am UTC](https://forums.unrealengine.com/t/pedometer-accelerator-api/269164 "2021-12-30T07:29:56Z")

</div>

Hi all! I’m wondering if UE has anything like Unitys pedometer api? I’m curious if there is a way to connect a smart watch to my ue4 project and pull pedometer/accelerator info in real time. Any and all advice is very mu…

---

## [Simple material swap python script not working](https://forums.unrealengine.com/t/simple-material-swap-python-script-not-working/131494)

<div class="topic-metadata">

**Author:** [@KM3d300](https://forums.unrealengine.com/u/KM3d300)\
**Replies:** 11\
**Last updated:** [December 29, 2021, 3:12am UTC](https://forums.unrealengine.com/t/simple-material-swap-python-script-not-working/131494 "2021-12-29T03:12:12Z")

</div>

Hi, Is there anything wrong with my code? It excutes but no materials replace. import unreal def replace\_material(original, replacement): original\_asset = unreal.EditorAssetLibrary.load\_asset(original) re…

---

## [Add Enum track to level sequence by python](https://forums.unrealengine.com/t/add-enum-track-to-level-sequence-by-python/268564)

<div class="topic-metadata">

**Author:** [@HEKenway](https://forums.unrealengine.com/u/HEKenway)\
**Replies:** 0\
**Last updated:** [December 27, 2021, 9:40am UTC](https://forums.unrealengine.com/t/add-enum-track-to-level-sequence-by-python/268564 "2021-12-27T09:40:48Z")

</div>

Hi, I’ve been working on add a series of custom anim blueprint variables to sequence to control my character by python(so I don’t have to add them everytime after creating another new sequence) I’ve been able to add boo…

---

## [\[UE5\] Text Render spawn using python bug](https://forums.unrealengine.com/t/ue5-text-render-spawn-using-python-bug/268480)

<div class="topic-metadata">

**Author:** [@Narsoi](https://forums.unrealengine.com/u/Narsoi)\
**Replies:** 0\
**Last updated:** [December 26, 2021, 8:52pm UTC](https://forums.unrealengine.com/t/ue5-text-render-spawn-using-python-bug/268480 "2021-12-26T20:52:10Z")

</div>

Hey there, I’m trying to spawn a TextRender actor using BP or Python (my case python). Problem is this does not seem to work UNLESS there’s already a TextRender asset placed in the level. I’m pretty sure the code is o…

---

## [How do I get the return value of stat](https://forums.unrealengine.com/t/how-do-i-get-the-return-value-of-stat/267722)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_ac972fa6](https://forums.unrealengine.com/u/anonymous_user_ac972fa6)\
**Replies:** 1\
**Last updated:** [December 23, 2021, 1:48am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-return-value-of-stat/267722 "2021-12-23T01:48:34Z")

</div>

I want to get the stat return value in real time and do some monitoring. Does anyone have the same problem and have a solution?

---

## [Debugging Python in Unreal 5 (or even 4.X)](https://forums.unrealengine.com/t/debugging-python-in-unreal-5-or-even-4-x/264658)

<div class="topic-metadata">

**Author:** [@mark.allender.ul](https://forums.unrealengine.com/u/mark.allender.ul)\
**Replies:** 1\
**Last updated:** [December 22, 2021, 8:00pm UTC](https://forums.unrealengine.com/t/debugging-python-in-unreal-5-or-even-4-x/264658 "2021-12-22T20:00:08Z")

</div>

Hello - We are using python 3.7 for editor scripting. That’s all working fine, but I’d like to get a debugger working for debugging python code while it’s running. I have been able to get this to work by loading up py…

---

## [Move camera while button is pressed](https://forums.unrealengine.com/t/move-camera-while-button-is-pressed/263337)

<div class="topic-metadata">

**Author:** [@RthJonas](https://forums.unrealengine.com/u/RthJonas)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 10:27am UTC](https://forums.unrealengine.com/t/move-camera-while-button-is-pressed/263337 "2021-12-20T10:27:07Z")

</div>

Hey. i cant find anything about it so im trying it here. I managed to move my camera with “WASD” and if my cursor hits the edge of the screen but i also want to implement that if the right mouse button is pressed and h…

---

## [unreal.AutomationLibrary.take\_automation\_screenshot\_of\_ui ...what is the latent\_info argument?](https://forums.unrealengine.com/t/unreal-automationlibrary-take_automation_screenshot_of_ui-what-is-the-latent_info-argument/147656)

<div class="topic-metadata">

**Author:** [@darkczar](https://forums.unrealengine.com/u/darkczar)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 3:33am UTC](https://forums.unrealengine.com/t/unreal-automationlibrary-take_automation_screenshot_of_ui-what-is-the-latent_info-argument/147656 "2021-12-20T03:33:44Z")

</div>

I’m trying to code some python to take a screenshot of the editor with the UI. I am calling this function like this… unreal.AutomationLibrary.take\_automation\_screenshot\_of\_ui(unreal.EditorLevelLibrary.get\_editor\_world(…

---

## [Combine "Print String" and "Append" in Blueprint Nodes](https://forums.unrealengine.com/t/combine-print-string-and-append-in-blueprint-nodes/267087)

<div class="topic-metadata">

**Author:** [@Heigl\_KFP](https://forums.unrealengine.com/u/Heigl_KFP)\
**Replies:** 0\
**Last updated:** [December 18, 2021, 8:08pm UTC](https://forums.unrealengine.com/t/combine-print-string-and-append-in-blueprint-nodes/267087 "2021-12-18T20:08:43Z")

</div>

Hi All, I have a question to all people that are well-versed in coding. What I try to do is combining the “print string” node with the “append” (string) node. The ideal outcome would be the same print string node, but w…

---

## [UE5：module 'unreal' has no attribute 'OnRenderMovieStopped'](https://forums.unrealengine.com/t/ue5-module-unreal-has-no-attribute-onrendermoviestopped/266622)

<div class="topic-metadata">

**Author:** [@LiangRayCong](https://forums.unrealengine.com/u/LiangRayCong)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 3:06am UTC](https://forums.unrealengine.com/t/ue5-module-unreal-has-no-attribute-onrendermoviestopped/266622 "2021-12-17T03:06:32Z")

</div>

I had used UE4.27 with Python Script, I was use the Python to create the Sequence , so I have to import the script which called “Movie Render Queue”, It was run successfully in UE4.27. But! When I use UE5.0 to run …

---

## [Details View not working correctly on a custom Editor Utility Widget](https://forums.unrealengine.com/t/details-view-not-working-correctly-on-a-custom-editor-utility-widget/266442)

<div class="topic-metadata">

**Author:** [@Faulkin](https://forums.unrealengine.com/u/Faulkin)\
**Replies:** 0\
**Last updated:** [December 15, 2021, 1:35pm UTC](https://forums.unrealengine.com/t/details-view-not-working-correctly-on-a-custom-editor-utility-widget/266442 "2021-12-15T13:35:00Z")

</div>

Hi! I’m working on an Editor Utility Widget and I’m having some weird issues when trying to add a Details View. There’s something very broken with the categories. Here’s an example I made in a new project and a fresh in…

---

## [Adding GeometryCache track to LevelSequence](https://forums.unrealengine.com/t/adding-geometrycache-track-to-levelsequence/153661)

<div class="topic-metadata">

**Author:** [@EnsilZah1](https://forums.unrealengine.com/u/EnsilZah1)\
**Replies:** 1\
**Last updated:** [December 14, 2021, 4:33pm UTC](https://forums.unrealengine.com/t/adding-geometrycache-track-to-levelsequence/153661 "2021-12-14T16:33:20Z")

</div>

Hi, I’m trying to add a GeometryCache track to a LevelSequence, but I’m failing on the MovieSceneGeometryCacheParams. As far as I understand I’m supposed to set the GeometryCache property to the cache, but I get errors …

---

## [Very Low Frame Rate In Engine Editor](https://forums.unrealengine.com/t/very-low-frame-rate-in-engine-editor/266028)

<div class="topic-metadata">

**Author:** [@Riv3r](https://forums.unrealengine.com/u/Riv3r)\
**Replies:** 0\
**Last updated:** [December 13, 2021, 3:20pm UTC](https://forums.unrealengine.com/t/very-low-frame-rate-in-engine-editor/266028 "2021-12-13T15:20:55Z")

</div>

4.26 and 4.27, just an empty project… My computer : CPU: Core i7-10700 GPU: NVIDIA GeForce GTX1660 Super RAM: 32Gb

---

## [Editor Utility Blueprint AssetActionUtility GrrrRRrr!](https://forums.unrealengine.com/t/editor-utility-blueprint-assetactionutility-grrrrrrr/149050)

<div class="topic-metadata">

**Author:** [@Dubh](https://forums.unrealengine.com/u/Dubh)\
**Replies:** 2\
**Last updated:** [December 10, 2021, 3:12pm UTC](https://forums.unrealengine.com/t/editor-utility-blueprint-assetactionutility-grrrrrrr/149050 "2021-12-10T15:12:43Z")

</div>

Anyone know what obvious thing I’m missing? I’ve found docs & tutorials doing this but I just can’t make it work! I’m trying to get Editor Utility Blueprint to operate on the selected content browser assets, but GetSel…

---

## [New to editor scripting: Modifying child components from CDO](https://forums.unrealengine.com/t/new-to-editor-scripting-modifying-child-components-from-cdo/264857)

<div class="topic-metadata">

**Author:** [@phil-vela](https://forums.unrealengine.com/u/phil-vela)\
**Replies:** 1\
**Last updated:** [December 10, 2021, 9:10am UTC](https://forums.unrealengine.com/t/new-to-editor-scripting-modifying-child-components-from-cdo/264857 "2021-12-10T09:10:11Z")

</div>

I’m new to editor scripting and (I think) I’ve figured out the difference between classes, generated classes and the class default objects. When trying to modify properties on the CDO - I can only modify things that exi…

---

## [How do i not spawn object that have been already collected?](https://forums.unrealengine.com/t/how-do-i-not-spawn-object-that-have-been-already-collected/491695)

<div class="topic-metadata">

**Author:** [@andrymas](https://forums.unrealengine.com/u/andrymas)\
**Replies:** 2\
**Last updated:** [December 7, 2021, 7:56pm UTC](https://forums.unrealengine.com/t/how-do-i-not-spawn-object-that-have-been-already-collected/491695 "2021-12-07T19:56:53Z")

</div>

I want to create a system that checks every time you enter a level if you already collected an item in that level so it doesn’t spawn it. I want also to do that every time even if you close and open the game again.

---

## [Call an "call in editor" blueprint  function from editor widget or python script](https://forums.unrealengine.com/t/call-an-call-in-editor-blueprint-function-from-editor-widget-or-python-script/491698)

<div class="topic-metadata">

**Author:** [@hamaro02](https://forums.unrealengine.com/u/hamaro02)\
**Replies:** 0\
**Last updated:** [December 7, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/call-an-call-in-editor-blueprint-function-from-editor-widget-or-python-script/491698 "2021-12-07T16:20:44Z")

</div>

Is there a way to call an “call in editor” blueprint function on a blueprint in the scene from an editor widget or python script?

---

## [SaveGameオブジェクトの中身をリセットしたい](https://forums.unrealengine.com/t/savegame/491625)

<div class="topic-metadata">

**Author:** [@yunagi\_1416](https://forums.unrealengine.com/u/yunagi_1416)\
**Replies:** 4\
**Last updated:** [December 7, 2021, 10:27am UTC](https://forums.unrealengine.com/t/savegame/491625 "2021-12-07T10:27:42Z")

</div>

UE4初心者です。スマートフォン向けのアプリを作成しています。 SaveGameオブジェクトを用いてアプリのログイン機能を管理する機能を実装しました。今の所うまくいっているのですが、一旦セーブしてしまうとその情報が.savファイルに記入されるので、テストプレイするのに少し不便で困っています。 またビルドした際にこうしたテストプレイの情報が残ったままになってしまうのも困ります。 そのため、SaveGameオブジェクトの中身をリセット…

---

## [Deleting curves from animation deletes the curve but animation remains](https://forums.unrealengine.com/t/deleting-curves-from-animation-deletes-the-curve-but-animation-remains/264504)

<div class="topic-metadata">

**Author:** [@Gabriel\_Paiva\_H](https://forums.unrealengine.com/u/Gabriel_Paiva_H)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 7:43pm UTC](https://forums.unrealengine.com/t/deleting-curves-from-animation-deletes-the-curve-but-animation-remains/264504 "2021-12-06T19:43:18Z")

</div>

Hello, am trying to delete animation curves with a python batch script and in my testing i do can remove the curve but even without the curve the animation is kept and working. If i manually create a new curve in that mo…

---

## [Control Rig custom attributes on controls](https://forums.unrealengine.com/t/control-rig-custom-attributes-on-controls/263820)

<div class="topic-metadata">

**Author:** [@Duncan\_Rudd](https://forums.unrealengine.com/u/Duncan_Rudd)\
**Replies:** 2\
**Last updated:** [December 2, 2021, 5:30pm UTC](https://forums.unrealengine.com/t/control-rig-custom-attributes-on-controls/263820 "2021-12-02T17:30:46Z")

</div>

Hi! I’m sure this is a common question so, apologies if this has already been answered elsewhere but I couldn’t find anything after 10 minutes of searching. I’m coming from a Maya rigging background and attempting to t…

---

## [Delegate Broadcasted from UStruct and Subscribed from UClass](https://forums.unrealengine.com/t/delegate-broadcasted-from-ustruct-and-subscribed-from-uclass/491487)

<div class="topic-metadata">

**Author:** [@anil021](https://forums.unrealengine.com/u/anil021)\
**Replies:** 0\
**Last updated:** [December 1, 2021, 5:06pm UTC](https://forums.unrealengine.com/t/delegate-broadcasted-from-ustruct-and-subscribed-from-uclass/491487 "2021-12-01T17:06:30Z")

</div>

Hello, I have a ustruct to hold some attributes like health. Whenever a change occurs in this attribute, I wan’t to fire a delegate. Subscribed uobjects will act differently depending on their function. For a brief examp…

---

## [Python Assigne Material to GeometryCache](https://forums.unrealengine.com/t/python-assigne-material-to-geometrycache/263512)

<div class="topic-metadata">

**Author:** [@Romhua](https://forums.unrealengine.com/u/Romhua)\
**Replies:** 0\
**Last updated:** [December 1, 2021, 2:14am UTC](https://forums.unrealengine.com/t/python-assigne-material-to-geometrycache/263512 "2021-12-01T02:14:27Z")

</div>

Hello, I dont find the way to assign a material to a GeometryCache. I can asign material to a StaticGeomtry with “.set\_material” but these function dont exist on GeometryCache. Do you have a solution? Thanks you!

---

## [How would i go about setting the material of a specifc component within my actor in this situation](https://forums.unrealengine.com/t/how-would-i-go-about-setting-the-material-of-a-specifc-component-within-my-actor-in-this-situation/263472)

<div class="topic-metadata">

**Author:** [@mstrkaan](https://forums.unrealengine.com/u/mstrkaan)\
**Replies:** 3\
**Last updated:** [December 1, 2021, 1:13am UTC](https://forums.unrealengine.com/t/how-would-i-go-about-setting-the-material-of-a-specifc-component-within-my-actor-in-this-situation/263472 "2021-12-01T01:13:55Z")

</div>

Hi, so im trying to change the properties of random components within my actor on spawn and I’m not sure how to go about setting the material. everything else in this blueprint works except for setting the material. any …

---

## [Force delete loaded asset?](https://forums.unrealengine.com/t/force-delete-loaded-asset/263028)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_f9d7b6ce](https://forums.unrealengine.com/u/anonymous_user_f9d7b6ce)\
**Replies:** 1\
**Last updated:** [November 30, 2021, 7:30pm UTC](https://forums.unrealengine.com/t/force-delete-loaded-asset/263028 "2021-11-30T19:30:53Z")

</div>

Hello, I’m trying to re-import a static mesh, but it needs to be deleted first for any changes to the fbx static mesh import data to be picked up. My problem is that I only want to delete it if any options from the ori…

---

## [How to change save game folder to game root?](https://forums.unrealengine.com/t/how-to-change-save-game-folder-to-game-root/342552)

<div class="topic-metadata">

**Author:** [@Hossein747](https://forums.unrealengine.com/u/Hossein747)\
**Replies:** 3\
**Last updated:** [November 30, 2021, 10:28am UTC](https://forums.unrealengine.com/t/how-to-change-save-game-folder-to-game-root/342552 "2021-11-30T10:28:09Z")

</div>

Hi When I develop my game, save game file saved in save folder in project directory. but when game packaged, and run the .exe file, save file will write in C:\\Users\[UserName\]\\AppData\\Local\[ProjectName\]\\Saved\\SaveGames\\ …

---

## [How do I interact with a widget component in my Blueprint?](https://forums.unrealengine.com/t/how-do-i-interact-with-a-widget-component-in-my-blueprint/491445)

<div class="topic-metadata">

**Author:** [@Unisink2020](https://forums.unrealengine.com/u/Unisink2020)\
**Replies:** 2\
**Last updated:** [November 29, 2021, 5:14pm UTC](https://forums.unrealengine.com/t/how-do-i-interact-with-a-widget-component-in-my-blueprint/491445 "2021-11-29T17:14:06Z")

</div>

I added a health bar but I cannot seem to be able to get a reference to access the custom events inside the widget component. I can’t cast to the specific class either. So how do I get the right reference?

---

## [Python - get paths to materials for a skeletal mesh asset](https://forums.unrealengine.com/t/python-get-paths-to-materials-for-a-skeletal-mesh-asset/263172)

<div class="topic-metadata">

**Author:** [@IMGoose](https://forums.unrealengine.com/u/IMGoose)\
**Replies:** 1\
**Last updated:** [November 29, 2021, 6:48am UTC](https://forums.unrealengine.com/t/python-get-paths-to-materials-for-a-skeletal-mesh-asset/263172 "2021-11-29T06:48:43Z")

</div>

Hi, I’m currently trying to find what is the best way using Python to obtain the paths to the material files for an asset selected in the Content Browser. I’ve looked through as much of the API documentation as I can b…

---

## [Python UI alternative/solution](https://forums.unrealengine.com/t/python-ui-alternative-solution/261395)

<div class="topic-metadata">

**Author:** [@Narsoi](https://forums.unrealengine.com/u/Narsoi)\
**Replies:** 2\
**Last updated:** [November 26, 2021, 9:22am UTC](https://forums.unrealengine.com/t/python-ui-alternative-solution/261395 "2021-11-26T09:22:47Z")

</div>

Hey everyone, I’m building a python script for UE5 and I was using out of habit PySide2 for its UI. Problem with PySide is that it does not come with Unreal package and the user will have to install it manually, a thin…

---

## [I have 2 dynamic arrays, I need to get the index of specific items of the same value and the match their index with items in the second array to get their value, so i can alter the second arrays values](https://forums.unrealengine.com/t/i-have-2-dynamic-arrays-i-need-to-get-the-index-of-specific-items-of-the-same-value-and-the-match-their-index-with-items-in-the-second-array-to-get-their-value-so-i-can-alter-the-second-arrays-values/427880)

<div class="topic-metadata">

**Author:** [@blisters50](https://forums.unrealengine.com/u/blisters50)\
**Replies:** 3\
**Last updated:** [November 26, 2021, 8:58am UTC](https://forums.unrealengine.com/t/i-have-2-dynamic-arrays-i-need-to-get-the-index-of-specific-items-of-the-same-value-and-the-match-their-index-with-items-in-the-second-array-to-get-their-value-so-i-can-alter-the-second-arrays-values/427880 "2021-11-26T08:58:41Z")

</div>

I have 2 dynamic arrays, I need to get the index of specific items of the same value and match their index with items in the second array to get their value, so i can alter the second arrays values. Is there a way to use…

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

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