# Accessing and Changes Values in Schema In Editor

**URL:** <https://forum.8thwall.com/t/accessing-and-changes-values-in-schema-in-editor/2510>\
**Category:** Technical Support\
**Created:** [August 22, 2024, 3:42pm UTC](https://forum.8thwall.com/t/accessing-and-changes-values-in-schema-in-editor/2510 "2024-08-22T15:42:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonard\_Wedderburn](https://avatars.discourse-cdn.com/v4/letter/l/9de0a6/32.png) [@Leonard\_Wedderburn](https://forum.8thwall.com/u/Leonard_Wedderburn)\
**Post date:** [August 22, 2024, 3:42pm UTC](https://forum.8thwall.com/t/accessing-and-changes-values-in-schema-in-editor/2510/1 "2024-08-22T15:42:22Z")

</div>

Hi, so I’m working on a project that I want to press a button to move around a object and set it’s position. To do that I need a button I can press that will change the value of variable in one script from another. In Unity to make it work, you have a reference to a public variable you can access from another script. In Studio, I believe the best way to make it work would be to access the Schema and get the variable there and change it.

How does that work? How do I access another script’s schema that changes the variable in the editor?

```auto
import * as ecs from '@8thwall/ecs'   
import {World} from '@8thwall/ecs'
import {SingleTap} from './SingleTap'

function TestSet()
{
 console.log(SingleTap.schema.PositionSet)
}

ecs.registerComponent({
  name: 'ResetPos',
  schema: {
    // Add data that can be configured on the component.
  Setbutton: ecs.eid,

  },
  schemaDefaults: {
    // Add defaults for the schema fields.
  },
  data: {
    // Add data that cannot be configured outside of the component.
  },
  add: (world, component) => {
    // Runs when the component is added to the world.
const {Setbutton} = component.schema
world.events.addListener(Setbutton,'click',TestSet)

```
