mlavik1 / unity-godot-chsarp-reference

MIRROR of: https://codeberg.org/matiaslavik/unity-godot-chsarp-reference - This document is an attempt at mapping Unity C# methods/classes/concepts to the corresponding Godot versions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unity-to-Godot C# reference

This document is an attempt at mapping Unity C# methods/classes/concepts to the corresponding Godot versions.

Unity and Godot are quite different by nature, but for everything you can do in Unity there's usually a way to do the same in Godot. Hope this can help others!

Callback methods

Unity Godot
Awake _EnterTree
Start _Ready
Update _Process
OnDestroy _ExitTree

Methods and properties

Unity Godot Example
Debug.Log GD.Print
Debug.LogError GD.PrintErr
Application.isEditor Engine.IsEditorHint
EditorUtility.OpenFilePanel EditorFileDialog Example
EditorUtility.SaveFilePanel EditorFileDialog Example
Material.SetColor ShaderMaterial.SetShaderParameter
Material.SetFloat ShaderMaterial.SetShaderParameter
Material.SetInt ShaderMaterial.SetShaderParameter
Material.SetTexture ShaderMaterial.SetShaderParameter
Quaternion.Euler Quaternion.FromEuler Example
MenuItem EditorPlugin.AddToolMenuItem Example
Texture2D.SetPixels Image.CreateFromData and ImageTexture.CreateFromImage Example
Transform.forward -GlobalTransform.Basis.Z Example
Time.deltaTime public override void _Process(double delta) Example

Attributes

Unity Godot
SerializeField Export
ExecuteInEditMode Tool

Classes

Unity Godot Example
Editor EditorInspectorPlugin
Texture2D ImageTexture Example
Texture3D ImageTexture3D
ScriptableObject Resource
ScriptedImporter EditorImportPlugin

Preprocessor definitions:

Unity Godot
UNITY_EDITOR TOOLS
UNITY_EDITOR_WIN + UNITY_STANDALONE_WIN GODOT_WINDOWS
UNITY_EDITOR_LINUX + UNITY_STANDALONE_LINUX GODOT_LINUXBSD
UNITY_EDITOR_OSX + UNITY_STANDALONE_OSX GODOT_MACOS

About

MIRROR of: https://codeberg.org/matiaslavik/unity-godot-chsarp-reference - This document is an attempt at mapping Unity C# methods/classes/concepts to the corresponding Godot versions.

License:Other