GithubHelp home page GithubHelp logo

Comments (4)

wuzhiming avatar wuzhiming commented on June 21, 2024 1

or you can upload a simple demo and we will try this
https://www.youtube.com/watch?v=vJX2dJir9M8

from cocos-engine.

wuzhiming avatar wuzhiming commented on June 21, 2024

When you change MyBytton.string and focus to another place editor will mark as dirty and the title will have change to xx.scene*

but if you want to know your text change event at inspector, you can use getter and setter as you provided and just add @executeInEditMode decorator

//add this decorator and this component will run on editor and you can use you setter and getter when on editor mode
@executeInEditMode
export class testComponent extends Component {
@property(MyText)
    private _text: MyText;
    
    @property(CCString)
    get string(): string { retunr this._text.string; }
    set string(value: string) { this._text.string = value; }
}

from cocos-engine.

ze0nni avatar ze0nni commented on June 21, 2024

Tried create minimal project to reproduct bug. But No problem not reproduced.

I think the problem is in my project. This is what it looks like:
https://www.youtube.com/watch?v=vJX2dJir9M8

I will research problem more

from cocos-engine.

ze0nni avatar ze0nni commented on June 21, 2024

Success. This happens if you use prefabs

CocosTest.zip

from cocos-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.