Skip to content

Commit

Permalink
Merge pull request #2 from Jummit/add_custom_type-method
Browse files Browse the repository at this point in the history
Use add_custom_type to add the OrbitCamera
  • Loading branch information
mrdev023 authored Nov 4, 2019
2 parents 57d5d78 + 2852b57 commit 0cf566a
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 1 deletion.
71 changes: 71 additions & 0 deletions addons/orbit_camera/orbit_camera_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/orbit_camera/orbit_camera_icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/orbit_camera_icon.svg-ec846f788d42e90042ed8dcf2b3e17b0.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/orbit_camera/orbit_camera_icon.svg"
dest_files=[ "res://.import/orbit_camera_icon.svg-ec846f788d42e90042ed8dcf2b3e17b0.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
2 changes: 1 addition & 1 deletion addons/orbit_camera/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ name="OrbitCamera"
description=""
author="MrDev023"
version="0.3"
script="orbit_camera.gd"
script="plugin.gd"
8 changes: 8 additions & 0 deletions addons/orbit_camera/plugin.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tool
extends EditorPlugin

func _enter_tree():
add_custom_type("OrbitCamera", "Camera", preload("res://addons/orbit_camera/orbit_camera.gd"), preload("res://addons/orbit_camera/orbit_camera_icon.svg"))

func _exit_tree():
remove_custom_type("OrbitCamera")

0 comments on commit 0cf566a

Please sign in to comment.