前提・実現したいこと
UnityのVRMで自作キャラを動かしたい
ここに質問の内容を詳しく書いてください。
Unityでこちらhttps://3owebcreate.com/web/design/vroid_hair_born#outline__4
を参照に自作キャラを動かしたいのですが下記のエラーが出て困っています。
どなたかUNITYで同じようなエラーが出た方、解消された方はいませんでしょうか?
お力添え、何卒お願いいたします。
Assets\UnityChan\Scripts\AutoBlink.cs(8,23): error CS0234: The type or namespace name 'policy' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)
### 該当のソースコード // //AutoBlink.cs //オート目パチスクリプト //2014/06/23 N.Kobayashi // using UnityEngine; using System.Collections; using System.Security.policy; namespace UnityChan { public class AutoBlink : MonoBehaviour { public bool isActive = true; //オート目パチ有効 public SkinnedMeshRenderer ref_SMR_EYE_DEF; //EYE_DEFへの参照 public SkinnedMeshRenderer ref_SMR_EL_DEF; //EL_DEFへの参照 public float ratio_Close = 85.0f; //閉じ目ブレンドシェイプ比率 public float ratio_HalfClose = 20.0f; //半閉じ目ブレンドシェイプ比率 [HideInInspector] public float ratio_Open = 0.0f; private bool timerStarted = false; //タイマースタート管理用 private bool isBlink = false; //目パチ管理用 public float timeBlink = 0.4f; //目パチの時間 private float timeRemining = 0.0f; //タイマー残り時間 public float threshold = 0.3f; // ランダム判定の閾値 public float interval = 3.0f; // ランダム判定のインターバル enum Status { Close, HalfClose, Open //目パチの状態 } private Status eyeStatus; //現在の目パチステータス void Awake () { //ref_SMR_EYE_DEF = GameObject.Find("EYE_DEF").GetComponent<SkinnedMeshRenderer>(); //ref_SMR_EL_DEF = GameObject.Find("EL_DEF").GetComponent<SkinnedMeshRenderer>(); } // Use this for initialization void Start () { ResetTimer (); // ランダム判定用関数をスタートする StartCoroutine ("RandomChange"); } //タイマーリセット void ResetTimer () { timeRemining = timeBlink; timerStarted = false; } // Update is called once per frame void Update () { if (!timerStarted) { eyeStatus = Status.Close; timerStarted = true; } if (timerStarted) { timeRemining -= Time.deltaTime; if (timeRemining <= 0.0f) { eyeStatus = Status.Open; ResetTimer (); } else if (timeRemining <= timeBlink * 0.3f) { eyeStatus = Status.HalfClose; } } } void LateUpdate () { if (isActive) { if (isBlink) { switch (eyeStatus) { case Status.Close: SetCloseEyes (); break; case Status.HalfClose: SetHalfCloseEyes (); break; case Status.Open: SetOpenEyes (); isBlink = false; break; } //Debug.Log(eyeStatus); } } } void SetCloseEyes () { ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_Close); ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_Close); } void SetHalfCloseEyes () { ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_HalfClose); ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_HalfClose); } void SetOpenEyes () { ref_SMR_EYE_DEF.SetBlendShapeWeight (6, ratio_Open); ref_SMR_EL_DEF.SetBlendShapeWeight (6, ratio_Open); } // ランダム判定用関数 IEnumerator RandomChange () { // 無限ループ開始 while (true) { //ランダム判定用シード発生 float _seed = Random.Range (0.0f, 1.0f); if (!isBlink) { if (_seed > threshold) { isBlink = true; } } // 次の判定までインターバルを置く yield return new WaitForSeconds (interval); } } } } ```ここに言語名を入力 C#
試したこと
ネットに乗ってあるエラー解消法を実践しているのですがうまくいきません。
https://www.ipentec.com/document/unity-error-cs0234-the-type-or-namespace-name-policy-does-not-exist-in-namespace-system-security
これとかNET 4.0とかは試したのですが、
直しても別のエラーが発生してしまいます。
Assets\UnityChanStage\Camera\CameraSwitcher.cs(26,13): error CS0029: Cannot implicitly convert type 'DepthOfFieldScatter' to 'bool'
Assets\UnityChanStage\Director\StageDirector.cs(53,16): error CS1061: 'ScreenOverlay' does not contain a definition for 'intensity' and no accessible extension method 'intensity' accepting a first argument of type 'ScreenOverlay' could be found (are you missing a using directive or an assembly reference?)
Assets\UnityChan\Scripts\AutoBlink.cs(8,23): error CS0234: The type or namespace name 'policy' does not exist in the namespace 'System.Security' (are you missing an assembly reference?)
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
バージョン20191.1f

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/04 11:20