# How can I spawn Actors by setting their class values from one level to another?

**URL:** <https://forums.unrealengine.com/t/how-can-i-spawn-actors-by-setting-their-class-values-from-one-level-to-another/715719>\
**Category:** Programming & Scripting\
**Tags:** spawn, unreal-engine, spawning-actors, Blueprint, CPP\
**Created:** [November 26, 2022, 12:43pm UTC](https://forums.unrealengine.com/t/how-can-i-spawn-actors-by-setting-their-class-values-from-one-level-to-another/715719 "2022-11-26T12:43:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kristian0049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kristian0049](https://forums.unrealengine.com/u/kristian0049)\
**Post date:** [December 5, 2022, 12:58pm UTC](https://forums.unrealengine.com/t/how-can-i-spawn-actors-by-setting-their-class-values-from-one-level-to-another/715719/3 "2022-12-05T12:58:20Z")

</div>

Solved , I’ve been digging for a whole week in the internet and I read that you cannot pass Class values through game instances , in this post [Game instance lose object on "Open level" - #6 by kristian0049](https://forums.unrealengine.com/t/game-instance-lose-object-on-open-level/440924/6) . So I used strings to compare with the string values , from a _for loop_ ,where I loop through an array of classes which contains the strings and assigned the matching class ,with that matching string , to spawn from that .

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-spawn-actors-by-setting-their-class-values-from-one-level-to-another/715719)._
