Class: U3d::UnityProject
- Inherits:
-
Object
- Object
- U3d::UnityProject
- Defined in:
- lib/u3d/installer.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #editor_version ⇒ Object
- #exist? ⇒ Boolean
-
#initialize(path) ⇒ UnityProject
constructor
A new instance of UnityProject.
Constructor Details
#initialize(path) ⇒ UnityProject
Returns a new instance of UnityProject.
431 432 433 |
# File 'lib/u3d/installer.rb', line 431 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
429 430 431 |
# File 'lib/u3d/installer.rb', line 429 def path @path end |
Instance Method Details
#editor_version ⇒ Object
439 440 441 442 443 |
# File 'lib/u3d/installer.rb', line 439 def editor_version require 'yaml' yaml = YAML.load(File.read("#{@path}/ProjectSettings/ProjectVersion.txt")) yaml['m_EditorVersion'] end |
#exist? ⇒ Boolean
435 436 437 |
# File 'lib/u3d/installer.rb', line 435 def exist? Dir.exist?("#{@path}/Assets") && Dir.exist?("#{@path}/ProjectSettings") end |