Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PrefabsCacheEditorComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Editor", description: "Attribute for managing editable entities. Works only with SCR_EditorBaseEntity!", icon: "WBData/ComponentEditorProps/componentEditor.png")]
5
14{
16
17 bool IsPrefabInherited(ResourceName prefab, ResourceName inheritedFrom)
18 {
19 if (prefab == ResourceName.Empty || inheritedFrom == ResourceName.Empty) return false;
20
21 array<ResourceName> inheritance = new array<ResourceName>;
22 if (!m_PrefabsCache.Contains(inheritedFrom))
23 {
24 Resource resource = Resource.Load(inheritedFrom);
25 if (resource.IsValid())
26 {
27 IEntitySource source = SCR_BaseContainerTools.FindEntitySource(resource);
28 while (source)
29 {
30 inheritance.Insert(source.GetResourceName());
31 source = source.GetAncestor();
32 }
33 m_PrefabsCache.Insert(inheritedFrom, inheritance);
34 }
35 }
36 else
37 {
38 inheritance = m_PrefabsCache.Get(inheritedFrom);
39 }
40
41 return inheritance.Find(prefab) != -1;
42 }
43};
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Object holding reference to resource. In destructor release the resource.
Definition Resource.c:25
void SCR_BaseEditorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition Types.c:486