Assets\RagdollDeath.cs(8,6): error CS0246: The type or namespace name ‘SerializedFieldAttribute’ could not be found (are you missing a using directive or an assembly reference?)
Assets\RagdollDeath.cs(8,6): error CS0246: The type or namespace name ‘SerializedField’ could not be found (are you missing a using directive or an assembly reference?)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RagdollDeath : MonoBehaviour
{
[Header("References")]
[SerializedField] private Animator animator = null;
private Rigidbody[] ragdollBodies;
private Collider[] ragdollColloders;
private void Start()
{
ragdollBodies = GetComponentsInChildren<Rigidbody>();
ragdollColliders = GetComponentsInChildren<Collider>();
ToggleRagdoll(False);
Invoke(nameof(Die), 5f);
}
private void Die()
{
ToggleRagdoll(true);
foreach(Rigidbody rb in ragdollBodies)
{
rb.AddExplosionForce(107f, new Vector3(-1f, 0.5f, -1f), 5f, 0f, ForceMode.Impulse);
}
}
private void ToggleRagdoll(bool state)
{
animator.enabled = !state;
foreach(Rigidbody rb in ragdollBodies)
{
rb.isKinematic = !state;
}
foreach (Collider collider in ragdollColliders)
{
collider.enabled = state;
}
}
}
[code]
i fixed it and i got 6 new errors and something else the last 2 lines:
Assets\animationStateController.cs(37,14): error CS0103: The name ‘isrunning’ does not exist in the current context
Assets\animationStateController.cs(42,13): error CS0103: The name ‘isrunning’ does not exist in the current context
Assets\RagdollDeath.cs(16,9): error CS0103: The name ‘ragdollColliders’ does not exist in the current context
Assets\RagdollDeath.cs(18,23): error CS0103: The name ‘False’ does not exist in the current context
Assets\RagdollDeath.cs(42,39): error CS0103: The name ‘ragdollColliders’ does not exist in the current context
Assets\scripts\controller\Movement.cs(52,12): error CS0103: The name ‘collisionn’ does not exist in the current context
Assets\Nokobot\Modern Guns - Handgun_Demo Assets\SimpleShoot.cs(16,40): warning CS0649: Field ‘SimpleShoot.casingExitLocation’ is never assigned to, and will always have its default value null
Those error messages are telling you what’s wrong. For example, this one:
tells you there is no such identifier as “ragdollColliders” in your class or method. You probably think there is, because (most likely) you meant to type “ragdollColliders” when you typed this line:
private Collider[ ] ragdollColloders;
See the difference?
Same with “False.” You probably meant “false.”
A lot of us are happy to help, but you need to put your own effort in as well. Look at the error messages and check your typing.
You’ll have to post the code for animationStateController. (Note: it is very common practice to give your classes names that start with a capital letter, like “AnimationStateController.”)
/// Event that captures a screenshot when triggered.
///
[CutsceneItem(“Utility”, “Storyboard”, CutsceneItemGenre.GlobalItem)]
public class StoryboardEvent : CinemaGlobalEvent
{
public string FolderName = “Storyboard”;
public static int Count = 0; // Count how many screenshots have been captured.
///
/// Capture screenshot on trigger.
///
public override void Trigger()
{
ScreenCapture.CaptureScreenshot(string.Format(@“Assets{0}{1}.png”, this.gameObject.name, Count++));
}
}
}
But Assets/Cinema Suite/Cinema Director/Cutscene Items/Global Items/Utility/StoryboardEvent.cs(20,13): error CS0103: The name `ScreenCapture’ does not exist in the current context.