Plugin property panel not displaying

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • Hi everyone! been encountering an issue where all plugin properties show [???] instead of their proper names in the Properties panel (see attached screenshot). my setup is in SDK v2 plugin with proper base classes (SDK.IPluginBase), properties defined with SetProperties() in plugin.js, Language file (en-US.json) has matching property definitions in plugins.mycompany_dommessaging.properties section,- Using globalThis.lang() for name/description in plugin constructor. Properties panel displays [???] for all property titles, but expressions return correct values and plugin is functional.

    Has anyone encountered this [???] display issue with SDK v2 properties?

    Any insights appreciated!

    Tagged:

  • For example

    github.com/Scirra/Construct-Addon-SDK/blob/main/plugin-sdk/v2/domMessagingPlugin/lang/en-US.json

    "properties": {
    					"test-property": {
    						"name": "Test property",
    						"desc": "A test number property."
    					}
    				},
    
    
    this._info.SetProperties([
    			new SDK.PluginProperty("integer", "test-property", 0)
    		]);
    
  • For example

    https://github.com/Scirra/Construct-Addon-SDK/blob/main/plugin-sdk/v2/domMessagingPlugin/lang/en-US.json

    > "properties": {
    					"test-property": {
    						"name": "Test property",
    						"desc": "A test number property."
    					}
    				},
    
    

    https://github.com/Scirra/Construct-Addon-SDK/blob/main/plugin-sdk/v2/domMessagingPlugin/plugin.js

    > this._info.SetProperties([
    > 			new SDK.PluginProperty("integer", "test-property", 0)
    > 		]);
    

    Thanks for replying.

    I think I've implemented that correctly?

    [ic]plugin.js
    
    const SDK = globalThis.SDK;
    const PLUGIN_ID = "MyCompany_DOMMessaging";
    const PLUGIN_CATEGORY = "general";
    
    const PLUGIN_CLASS = SDK.Plugins.MyCompany_DOMMessaging = class extends SDK.IPluginBase
    {
     constructor()
     {
     super(PLUGIN_ID);
     
    
     SDK.Lang.PushContext("plugins." + PLUGIN_ID.toLowerCase()); // "plugins.mycompany_dommessaging"
     
     // Plugin info with language strings
     this._info.SetName(globalThis.lang(".name"));
     this._info.SetDescription(globalThis.lang(".description"));
     this._info.SetCategory(PLUGIN_CATEGORY);
     this._info.SetAuthor("MyCompany");
     this._info.SetHelpUrl(globalThis.lang(".help-url"));
     this._info.SetIsSingleGlobal(true);
     this._info.SetRuntimeModuleMainScript("c3runtime/main.js");
     this._info.SetDOMSideScripts(["c3runtime/domSide.js"]);
     
     // PROPERTIES 
     this._info.SetProperties([
     new SDK.PluginProperty("group", "app-config"), // [???] - Should show "Application Configuration"
     new SDK.PluginProperty("text", "app-name", "My Application"), // [???] - Should show "Application Name"
     new SDK.PluginProperty("text", "app-version", "1.0.0"), // [???] - Should show "Application Version"
     new SDK.PluginProperty("longtext", "app-description", "A web application built with Construct 3"), // [???]
     new SDK.PluginProperty("text", "permissions", "storage,activeTab"), // [???] - Should show "Permissions"
     
     new SDK.PluginProperty("group", "layout-config"), // [???] - Should show "Layout Configuration"
     new SDK.PluginProperty("text", "popup-layout", ""), // [???] - Should show "Popup Layout"
     new SDK.PluginProperty("text", "options-layout", ""), // [???] - Should show "Options Layout"
     new SDK.PluginProperty("text", "background-layout", "") // [???] - Should show "Background Layout"
     ]);
     
     SDK.Lang.PopContext(); // Pop "plugins.mycompany_dommessaging"
     }
    };
    
    PLUGIN_CLASS.Register(PLUGIN_ID, PLUGIN_CLASS);
    
    
    

    eng-lang { "$schema": "../plugin.lang.schema.json", "languageTag": "en-US", "fileDescription": "Strings for DOM Messaging addon", "text": { "plugins": { "mycompany_dommessaging": { "name": "DOM Messaging", "description": "Helper addon for creating web applications from Construct 3 projects", "help-url": "https://example.com/help", // PROPERTIES - "properties": { "app-config": { "name": "Application Configuration", "desc": "Basic application settings" }, "app-name": { "name": "Application Name", "desc": "The name of your application" }, "app-version": { "name": "Application Version", "desc": "The version number of your application (e.g., 1.0.0)" }, "app-description": { "name": "Application Description", "desc": "A brief description of what your application does" }, "permissions": { "name": "Permissions", "desc": "Application permissions (comma-separated)" }, "background-layout": { "name": "Background Layout", "desc": "The name of the layout to use for the background script" } } } } } }

    addon.json { "is-c3-addon": true, "type": "plugin", "name": "DOM Messaging", "id": "MyCompany_DOMMessaging", "version": "1.0.0.0", "author": "MyCompany", "website": "https://example.com", "documentation": "https://example.com/docs", "description": "Helper addon for creating applications from Construct 3 projects.", "editor-scripts": [ "plugin.js" // Main plugin definition file ], "file-list": [ "c3runtime/main.js", "c3runtime/type.js", "c3runtime/instance.js", "c3runtime/actions.js", "c3runtime/expressions.js", "c3runtime/domSide.js", "aces.json", "lang/en-US.json" // Language file reference ] }

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tested your code no problem, try to remove the addon from addon manager, and add it back.

  • {
    
    
    	"languageTag": "en-US",
    	"fileDescription": "Strings for DOMMessaging.",
    	"text": {
    		"plugins": {
    			"mycompany_dommessaging": {
    				"name": "MyDOMPlugin",
    				"description": "An example third-party plugin using DOM messaging.",
    				"help-url": "https://www.construct.net",
    				"properties": {
    					"test-property": {
    						"name": "Test property",
    						"desc": "A test number property."
    					},
    					"app-config": {
    						"name": "app-config",
    						"desc": "app-config."
    					},
    					"app-name": {
    						"name": "app-name",
    						"desc": "app-name."
    					},
    					"app-version": {
    						"name": "app-version",
    						"desc": "app-version"
    					},
    					"app-description": {
    						"name": "app-description",
    						"desc": "app-description"
    					},
    					"permissions": {
    						"name": "permissions",
    						"desc": "permissions"
    					},
    					"layout-config": {
    						"name": "layout-config",
    						"desc": "layout-config"
    					},
    					"popup-layout": {
    						"name": "popup-layout",
    						"desc": "popup-layout"
    					},
    					"options-layout": {
    						"name": "options-layout",
    						"desc": "options-layout"
    					},
    					"background-layout": {
    						"name": "background-layout",
    						"desc": "background-layout"
    					}
    				},
    				"aceCategories": {
    					"custom": "Custom"
    				},
    				"conditions": {
    				},
    				"actions": {
    					"set-document-title": {
    						"list-name": "Set document title",
    						"display-text": "Set document title to [b]{0}[/b]",
    						"description": "Set the document title to a string.",
    						"params": {
    							"title": {
    								"name": "Title",
    								"desc": "The document title to set."
    							}
    						}
    					}
    				},
    				"expressions": {
    					"get-document-title": {
    						"description": "Get the current document title.",
    						"translated-name": "DocumentTitle"
    					}
    				}
    			}
    		}
    	}
    }
    
    
    
    const SDK = globalThis.SDK;
    
    ////////////////////////////////////////////
    // The plugin ID is how Construct identifies different kinds of plugins.
    // *** NEVER CHANGE THE PLUGIN ID! ***
    // If you change the plugin ID after releasing the plugin, Construct will think it is an entirely different
    // plugin and assume it is incompatible with the old one, and YOU WILL BREAK ALL EXISTING PROJECTS USING THE PLUGIN.
    // Only the plugin name is displayed in the editor, so to rename your plugin change the name but NOT the ID.
    // If you want to completely replace a plugin, make it deprecated (it will be hidden but old projects keep working),
    // and create an entirely new plugin with a different plugin ID.
    const PLUGIN_ID = "MyCompany_DOMMessaging";
    ////////////////////////////////////////////
    
    const PLUGIN_CATEGORY = "general";
    
    const PLUGIN_CLASS = SDK.Plugins.MyCompany_DOMMessaging = class MyCustomPlugin extends SDK.IPluginBase
    {
    	constructor()
    	{
    		super(PLUGIN_ID);
    		
    		SDK.Lang.PushContext("plugins." + PLUGIN_ID.toLowerCase());
    		
    		this._info.SetName(globalThis.lang(".name"));
    		this._info.SetDescription(globalThis.lang(".description"));
    		this._info.SetCategory(PLUGIN_CATEGORY);
    		this._info.SetAuthor("Scirra");
    		this._info.SetHelpUrl(globalThis.lang(".help-url"));
    		this._info.SetIsSingleGlobal(true);
    		this._info.SetRuntimeModuleMainScript("c3runtime/main.js");
    
    		// Set the domSide.js script to run in the context of the DOM
    		this._info.SetDOMSideScripts(["c3runtime/domSide.js"]);
    		
    		SDK.Lang.PushContext(".properties");
    		
    		this._info.SetProperties([
    			new SDK.PluginProperty("integer", "test-property", 0),
    			new SDK.PluginProperty("group", "app-config"), // [???] - Should show "Application Configuration"
     new SDK.PluginProperty("text", "app-name", "My Application"), // [???] - Should show "Application Name"
     new SDK.PluginProperty("text", "app-version", "1.0.0"), // [???] - Should show "Application Version"
     new SDK.PluginProperty("longtext", "app-description", "A web application built with Construct 3"), // [???]
     new SDK.PluginProperty("text", "permissions", "storage,activeTab"), // [???] - Should show "Permissions"
    
     new SDK.PluginProperty("group", "layout-config"), // [???] - Should show "Layout Configuration"
     new SDK.PluginProperty("text", "popup-layout", ""), // [???] - Should show "Popup Layout"
     new SDK.PluginProperty("text", "options-layout", ""), // [???] - Should show "Options Layout"
     new SDK.PluginProperty("text", "background-layout", "") // [???] - Should show "Background Layout"
    		]);
    		
    		SDK.Lang.PopContext();		// .properties
    		
    		SDK.Lang.PopContext();
    	}
    };
    
    PLUGIN_CLASS.Register(PLUGIN_ID, PLUGIN_CLASS);
    
    
    
    
    
Jump to:
Active Users
There are 1 visitors browsing this topic (1 users and 0 guests)