Commit ff5fb3dc by 郭有超

fix bug

1 parent f1ab0f90
注意: 默认敏感词库是属于关闭状态
# unity版本中敏感词库的使用步骤(需要开启游戏的网络权限)
第一步: 引入词库和SDK脚本
1) 将word.txt 放入Asserts目录下面的Resources目录(在没有网络的情况下使用)
2) 将SSdk.cs 导入到项目的Asserts目录下的Scenes目录下
第二步: 在游戏的初始化场景中使用如下方法初始化敏感词库的SDK
1)引用命名空间: using SS;
2)开启SDK: SSdk.get_sdk().open_sdk();
3)初始: SSdk.get_sdk().init(this);
第三步: SDK相关接口
1) check(string content, char replace_char)(注: 如果敏感词库关闭的话 则返回原本的文本信息)
第一个参数是需要检测的文本信息 传入string 第二个参数是需要将敏感词替换成的字符 类型为char
例: string _data = SSdk.get_sdk().check("逗比世界", '*');
2) open_sdk() 开启SDK
3) close_sdk() 关闭SDK
4) set_app_id(string _app_id) 设置应用的ID 注意!!!: 暂时没有用到
5) set_app_secret(string _app_secret) 设置应用的密钥 注意!!!: 暂时没有用到
6) open_console() 开启SDK 中的输出信息
7) close_console() 开启SDK 中的输出信息
提示: 一般第一步第二步设置完成后 直接使用 check(string content, char replace_char) 接口就可以了.
\ No newline at end of file
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!