protected override bool DrawUniqueDetectorProperties()
        {
            if (!EditorPrefs.GetBool(ACTkEditorGlobalStuff.PrefsInjectionEnabled))
            {
                EditorGUILayout.Separator();
                EditorGUILayout.LabelField("Injection Detector is not enabled!", EditorStyles.boldLabel);
                if (GUILayout.Button("Enable in Settings..."))
                {
                    ACTkSettings.ShowWindow();
                }

                return(true);
            }

            if (!ACTkPostprocessor.IsInjectionDetectorTargetCompatible())
            {
                EditorGUILayout.LabelField("Injection Detector disabled for this platform.", EditorStyles.boldLabel);
                return(true);
            }

            return(false);
        }
Example #2
0
        protected override bool DrawUniqueDetectorProperties()
        {
            var detector = self as WallHackDetector;

            if (detector == null)
            {
                return(false);
            }

            DrawHeader("Specific settings");

            if (PropertyFieldChanged(checkRigidbody, new GUIContent("Rigidbody")))
            {
                detector.CheckRigidbody = checkRigidbody.boolValue;
            }

            if (PropertyFieldChanged(checkController, new GUIContent("Character Controller")))
            {
                detector.CheckController = checkController.boolValue;
            }

            if (PropertyFieldChanged(checkWireframe, new GUIContent("Wireframe")))
            {
                detector.CheckWireframe = checkWireframe.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(wireframeDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            if (PropertyFieldChanged(checkRaycast, new GUIContent("Raycast")))
            {
                detector.CheckRaycast = checkRaycast.boolValue;
            }
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(raycastDelay, new GUIContent("Delay"));
            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(spawnPosition);
            EditorGUILayout.PropertyField(maxFalsePositives);

            EditorGUILayout.Separator();

            if (!ACTkSettings.IsWallhackDetectorShaderIncluded())
            {
                EditorGUILayout.Separator();
                EditorGUILayout.LabelField("You need to include specific shader into your build to let WallHackDetector work properly.", EditorStyles.wordWrappedLabel);
                if (GUILayout.Button("Include in Settings..."))
                {
                    ACTkSettings.ShowWindow();
                }
            }

            if (checkRaycast.boolValue || checkController.boolValue || checkRigidbody.boolValue)
            {
                var layerId = LayerMask.NameToLayer("Ignore Raycast");
                if (Physics.GetIgnoreLayerCollision(layerId, layerId))
                {
                    EditorGUILayout.LabelField("IgnoreRaycast physics layer should collide with itself to avoid false positives! See readme's troubleshooting section for details.", EditorStyles.wordWrappedLabel);
                    if (GUILayout.Button("Edit in Physics settings"))
                    {
                        EditorApplication.ExecuteMenuItem("Edit/Project Settings/Physics");
                    }
                }
            }

            return(true);
        }