Class CustomDoor
Defines a custom door for a building imported by Asset-Injection framework.
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
[ExecuteInEditMode]
[RequireComponent(typeof(BoxCollider))]
public class CustomDoor : MonoBehaviour
Remarks
TODO:
- Interior to exterior transition should be based on position of new doors.
Fields
| Improve this Doc View SourceDisableClassicDoors
Declaration
[Tooltip("Disables all classic doors on this building (not only on the gameobject where this component is added).")]
public bool DisableClassicDoors
Field Value
Type | Description |
---|---|
Boolean |
DoorTrigger
The trigger for this door.
Declaration
[Tooltip("The trigger for this door. If unset, uses the first box collider found on gameobject.")]
public BoxCollider DoorTrigger
Field Value
Type | Description |
---|---|
BoxCollider |
StaticDoorCopied
Declaration
[Tooltip("Choose which of the doors in this model's Static Door array will be copied for this custom door.")]
public int StaticDoorCopied
Field Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceHasHit(RaycastHit, out StaticDoor)
Checks for a door hit.
Declaration
public static bool HasHit(RaycastHit raycastHit, out StaticDoor door)
Parameters
Type | Name | Description |
---|---|---|
RaycastHit | raycastHit | The raycast result. |
StaticDoor | door | The door found at hit position. |
Returns
Type | Description |
---|---|
Boolean | True if a door has been hit. |
Remarks
Modders should ensure that the CustomDoor component is added to the right gameobject. This allows to avoid unnecessary seeks on parent/children, which are potentially performance heavy.
InitDoors(GameObject, StaticDoor[], Int32, out Boolean)
Set static door data to all doors in the given building gameobject.
Declaration
public static void InitDoors(GameObject building, StaticDoor[] staticDoors, int buildingKey, out bool dontCreateStaticDoors)
Parameters
Type | Name | Description |
---|---|---|
GameObject | building | The imported gameobject which provides building and doors. |
StaticDoor[] | staticDoors | The list of static doors for the vanilla building. |
Int32 | buildingKey | The key of the building that owns the doors. |
Boolean | dontCreateStaticDoors | If true, custom door components request to suppress classic doors. |