Entity/GetModel

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Bug)
 
(One intermediate revision by one user not shown)
Line 3: Line 3:
  
 
{{Bug|Issue=2246|This does not necessarily return the model's path, as is the case for brush and virtual models. This is intentional behaviour, however, there is currently no way to retrieve the actual file path.}}
 
{{Bug|Issue=2246|This does not necessarily return the model's path, as is the case for brush and virtual models. This is intentional behaviour, however, there is currently no way to retrieve the actual file path.}}
{{Bug|Issue=3695|This can return nil for some entities.}}
 
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
Line 10: Line 9:
 
|type=string
 
|type=string
 
|desc=The entity's model. Will be a filesystem path for most models.
 
|desc=The entity's model. Will be a filesystem path for most models.
 +
 +
This will be {{Type|nil}} for entities which cannot have models, such as point entities.
 
}}
 
}}

Latest revision as of 15:18, 14 June 2019

 Entity:GetModel( )

Description

Gets the model of given entity.

BUG

This does not necessarily return the model's path, as is the case for brush and virtual models. This is intentional behaviour, however, there is currently no way to retrieve the actual file path.

Issue Tracker: #2246

Returns

string

The entity's model. Will be a filesystem path for most models.

This will be nil for entities which cannot have models, such as point entities.
Personal tools
Navigation