In Godot, C# is integrated with the engine using marshaling. Marshalling is the process of converting a C# type to a Godot type. However, not all types can be converted, leading to marshalling problems. This is primarily an issue for editor plugins, because they must be able to persist across solution rebuilds. When you build the C# solution (either through the build button in the top right of Godot or from your IDE), Godot attempts to serialize all C# tool scripts, replace those scripts with the new ones after the rebuild, and then deserialize the data back into the new scripts. However, this requires marshalling the fields and properties of the C# tool scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Viewport | |
enum STRETCH_MODE { DISABLED, TWO_D, VIEWPORT } | |
enum STRETCH_ASPECT { IGNORE, KEEP, KEEP_WIDTH, KEEP_HEIGHT, EXPAND } | |
export(STRETCH_MODE) var stretch_mode = STRETCH_MODE.DISABLED | |
export(STRETCH_ASPECT) var stretch_aspect = STRETCH_MODE.DISABLED | |
export var stretch_scale: float = 1 | |
export var override_project_settings: bool = false | |
export var stretch_min: Vector2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Permission } from "@src/generated/model.types"; | |
export type SecurityParams = { | |
[entity: string]: { | |
[field: string]: ((newValue: any) => Promise<Error | void>)[] | |
} | |
} | |
export function mergeSecurityParams(... params: SecurityParams[]) { | |
return mergeUnionArraysMany(...params) as SecurityParams; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpError } from "@src/utils/utils"; | |
export type ValidationOptions = { | |
[entity: string]: { | |
[field: string]: ((newValue: any) => Promise<Error | void>)[] | |
} | |
} | |
export function mergeValidationOptions(... options: ValidationOptions[]) { | |
return mergeUnionArraysMany(...options) as ValidationOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>MathJax example</title> | |
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> | |
<script id="MathJax-script" async | |
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> | |
</script> |